aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGit Development Community2009-09-29 19:47:03 (EDT)
committerShawn O. Pearce2009-09-29 19:47:03 (EDT)
commit1a6964c8274c50f0253db75f010d78ef0e739343 (patch)
treeca833cc7cf6fc8c7b9850dee258f3a356c790ffc
downloadjgit-1a6964c8274c50f0253db75f010d78ef0e739343.zip
jgit-1a6964c8274c50f0253db75f010d78ef0e739343.tar.gz
jgit-1a6964c8274c50f0253db75f010d78ef0e739343.tar.bz2
Initial JGit contribution to eclipse.org
Per CQ 3448 this is the initial contribution of the JGit project to eclipse.org. It is derived from the historical JGit repository at commit 3a2dd9921c8a08740a9e02c421469e5b1a9e47cb. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--.gitattributes1
-rw-r--r--.gitignore6
-rw-r--r--LICENSE42
-rw-r--r--README122
-rw-r--r--SUBMITTING_PATCHES366
-rw-r--r--TODO49
-rw-r--r--jgit-maven/.gitignore1
-rw-r--r--jgit-maven/jgit/pom.xml226
-rw-r--r--jgit.sh94
-rw-r--r--make_jgit.sh179
-rw-r--r--org.eclipse.jgit.pgm/.classpath8
-rw-r--r--org.eclipse.jgit.pgm/.gitignore1
-rw-r--r--org.eclipse.jgit.pgm/.project17
-rw-r--r--org.eclipse.jgit.pgm/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.jgit.pgm/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs321
-rw-r--r--org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin30
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java137
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java216
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java187
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java78
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java194
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java164
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java125
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java65
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java119
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java111
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java132
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java76
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java71
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java129
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java86
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java85
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java184
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java80
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java256
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java74
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java81
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java74
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java208
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java98
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java68
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java100
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java241
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java80
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java58
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/build/JarLinkUtil.java212
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java74
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java60
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java313
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java76
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java121
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java80
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java61
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java143
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java177
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java101
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java108
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java84
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java146
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java114
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java100
-rw-r--r--org.eclipse.jgit.test/.classpath11
-rw-r--r--org.eclipse.jgit.test/.gitignore3
-rw-r--r--org.eclipse.jgit.test/.project17
-rw-r--r--org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--org.eclipse.jgit.test/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs320
-rw-r--r--org.eclipse.jgit.test/.settings/org.eclipse.jdt.ui.prefs10
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/SpeedTestBase.java116
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0005_ShallowSpeedTest.java91
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0006_DeepSpeedTest.java94
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java227
-rw-r--r--org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests (Java 6).launch21
-rw-r--r--org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests.launch20
-rw-r--r--org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests (Java 6).launch21
-rw-r--r--org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests.launch20
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E.patch6
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PostImage1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PreImage0
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X.patch24
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PostImage28
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PreImage25
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y.patch8
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PostImage1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PreImage1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z.patch8
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PostImage1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PreImage1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext0.out18
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext1.out24
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext10.out37
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext100.out37
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext3.out30
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext5.out34
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/.gitattributes1
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testEditList_Types.patch24
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_BodyTooLong.patch17
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_CcTruncatedOld.patch24
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_DisconnectedHunk.patch30
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GarbageBetweenFiles.patch33
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GitBinaryNoForwardHunk.patch10
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedNew.patch15
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedOld.patch15
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch21
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch21
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch13
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_NoBinary.patch4
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_AddNoNewline.patch20
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcDeleteFile.patch12
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcNewFile.patch14
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_ConfigCaseInsensitive.patch67
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_FixNoNewline.patch20
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryDelta.patch21
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryLiteral.patch135
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_NoBinary.patch83
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_OneFileCc.patch27
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/all_packed_objects.txt96
-rwxr-xr-xorg.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/create-second-pack166
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.indexbin0 -> 134799 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.lsfiles1437
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.lstree331
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-3280af9c07ee18a87705ef50b0cc4cd20266cf12.idxbin0 -> 1296 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-3280af9c07ee18a87705ef50b0cc4cd20266cf12.packbin0 -> 562 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.idxbin0 -> 1256 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.idxV2bin0 -> 1296 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.packbin0 -> 7811 bytes
-rwxr-xr-xorg.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-546ff360fe3488adb20860ce3436a2d6373d2796.idxbin0 -> 1324 bytes
-rwxr-xr-xorg.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-546ff360fe3488adb20860ce3436a2d6373d2796.packbin0 -> 1265 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-9fb5b411fe6dfa89cc2e6b89d2bd8e5de02b5745.idxbin0 -> 1100 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-9fb5b411fe6dfa89cc2e6b89d2bd8e5de02b5745.packbin0 -> 164 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.idxbin0 -> 1240 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-cbdeda40019ae0e6e789088ea0f51f164f489d14.packbin0 -> 651 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-df2982f284bbabb6bdb59ee3fcc6eb0983e20371.idxbin0 -> 2976 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-df2982f284bbabb6bdb59ee3fcc6eb0983e20371.idxV2bin0 -> 2976 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-df2982f284bbabb6bdb59ee3fcc6eb0983e20371.packbin0 -> 5901 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-e6d07037cbcf13376308a0a995d1fa48f8f76aaa.idxbin0 -> 1112 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-e6d07037cbcf13376308a0a995d1fa48f8f76aaa.packbin0 -> 1643 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/pack-huge.idxbin0 -> 2368 bytes
-rw-r--r--org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/packed-refs36
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterReflowTest.java183
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/EditListTest.java127
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/EditTest.java146
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextTest.java100
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java197
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java97
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java259
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java219
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheFindTest.java92
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java275
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheLargePathTest.java112
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheTreeTest.java189
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/fnmatch/FileNameMatcherTest.java764
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/AbbreviatedObjectIdTest.java351
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConcurrentRepackTest.java264
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConstantsEncodingTest.java95
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexDiffTest.java191
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/IndexTreeWalkerTest.java152
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/MockSystemReader.java97
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java1331
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/PackIndexTestCase.java168
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/PackIndexV1Test.java82
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/PackIndexV2Test.java93
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/PackReverseIndexTest.java121
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/PackWriterTest.java533
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReadTreeTest.java581
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefTest.java166
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefUpdateTest.java768
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ReflogReaderTest.java176
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java132
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryConfigTest.java259
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java347
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_ObjectId.java111
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0001_PersonIdent.java111
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0002_Tree.java287
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0003_Basic.java581
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0004_PackReader.java114
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0007_Index.java455
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0008_testparserev.java142
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/TreeIteratorLeafOnlyTest.java129
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/TreeIteratorPostOrderTest.java147
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/TreeIteratorPreOrderTest.java147
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java177
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/WindowCacheGetTest.java149
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/WindowCacheReconfigureTest.java125
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/WorkDirCheckoutTest.java133
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/XInputStream.java88
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/empty.gitindex.datbin0 -> 32 bytes
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/sorttest.gitindex.datbin0 -> 288 bytes
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java156
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java391
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java101
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java434
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java148
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcErrorTest.java103
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchCcTest.java206
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchErrorTest.java180
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/PatchTest.java358
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/AlwaysEmptyRevQueueTest.java69
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/DateRevQueueTest.java124
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FIFORevQueueTest.java87
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java323
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/LIFORevQueueTest.java75
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ObjectWalkTest.java196
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java321
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevFlagSetTest.java137
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java177
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevQueueTestCase.java91
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java356
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkCullTest.java100
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFilterTest.java297
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkMergeBaseTest.java139
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter1Test.java182
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java168
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkSortTest.java168
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java183
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BundleWriterTest.java160
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/IndexPackTest.java123
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/LongMapTest.java138
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java228
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java268
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java181
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java418
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefSpecTest.java275
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RemoteConfigTest.java432
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java152
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java197
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java247
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/AbstractTreeIteratorTest.java169
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java353
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/EmptyTreeIteratorTest.java112
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java173
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java211
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java195
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkBasicDiffTest.java122
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/AlwaysCloneTreeFilter.java63
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/NotTreeFilterTest.java91
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTestCase.java139
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java80
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/IntListTest.java162
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/JGitTestUtil.java79
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java334
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneStyleTest.java117
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneUserPathStyleTest.java136
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java187
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_HexParseTest.java164
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_LineMapTest.java98
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_MatchTest.java75
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/StringUtilsTest.java84
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java380
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TestRng.java67
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/TimeoutInputStreamTest.java189
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/TimeoutOutputStreamTest.java285
-rw-r--r--org.eclipse.jgit/.classpath7
-rw-r--r--org.eclipse.jgit/.fbprefs125
-rw-r--r--org.eclipse.jgit/.gitignore1
-rw-r--r--org.eclipse.jgit/.project28
-rw-r--r--org.eclipse.jgit/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.jgit/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.jgit/.settings/org.eclipse.jdt.core.prefs321
-rw-r--r--org.eclipse.jgit/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--org.eclipse.jgit/META-INF/MANIFEST.MF21
-rw-r--r--org.eclipse.jgit/build.properties5
-rw-r--r--org.eclipse.jgit/findBugs/FindBugsExcludeFilter.xml27
-rw-r--r--org.eclipse.jgit/plugin.properties2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java190
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/awtui/AwtAuthenticator.java197
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/awtui/CommitGraphPane.java256
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/awtui/SwingCommitList.java87
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java220
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java195
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java99
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java190
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java84
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java201
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java756
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java133
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java252
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java272
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java502
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java239
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java575
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/CheckoutConflictException.java82
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java87
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/ConfigInvalidException.java71
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/CorruptObjectException.java91
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/EntryExistsException.java64
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/GitlinksNotSupportedException.java65
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/IncorrectObjectTypeException.java86
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/InvalidObjectIdException.java76
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/InvalidPatternException.java75
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java79
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingObjectException.java81
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/NoClosingBracketException.java79
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/NoRemoteRepositoryException.java65
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/NotSupportedException.java77
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/ObjectWritingException.java75
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java62
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/PackMismatchException.java61
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/PackProtocolException.java107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/RepositoryNotFoundException.java71
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/RevWalkException.java70
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/RevisionSyntaxException.java85
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/StopWalkException.java61
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/SymlinksNotSupportedException.java64
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/TransportException.java109
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/UnmergedPathException.java73
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java81
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java60
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java382
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java227
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/Head.java57
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java63
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java59
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java56
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java260
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AbstractIndexTreeVisitor.java79
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AlternateRepositoryDatabase.java133
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java492
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BinaryDelta.java141
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BlobBasedConfig.java129
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ByteArrayWindow.java97
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ByteBufferWindow.java110
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ByteWindow.java185
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Commit.java380
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java1154
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java463
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java87
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DeltaOfsPackedObjectLoader.java82
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DeltaPackedObjectLoader.java116
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DeltaRefPackedObjectLoader.java81
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileBasedConfig.java149
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java254
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java117
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ForceModified.java75
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java976
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java92
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexChangedEvent.java61
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java166
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexTreeVisitor.java103
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexTreeWalker.java248
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/InflaterCache.java109
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/LockFile.java411
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/MutableObjectId.java186
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java78
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java365
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java383
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDirectory.java517
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java273
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java183
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java105
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectWriter.java412
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/OffsetCache.java539
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackFile.java515
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndex.java316
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndexV1.java201
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndexV2.java277
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndexWriter.java273
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndexWriterV1.java84
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackIndexWriterV2.java107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackLock.java90
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackOutputStream.java107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackReverseIndex.java191
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java1045
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PackedObjectLoader.java193
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java339
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ProgressMonitor.java97
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java285
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java79
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java522
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefLogWriter.java155
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefRename.java175
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java642
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java171
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java183
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefsChangedEvent.java61
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java1176
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryAdapter.java60
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java390
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryChangedEvent.java70
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryConfig.java135
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryListener.java69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java161
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java90
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java302
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java142
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TransferConfig.java71
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java608
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java301
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeIterator.java209
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeVisitor.java95
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeVisitorWithCurrentDirectory.java78
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Treeish.java63
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/UnpackedObjectCache.java195
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/UnpackedObjectLoader.java212
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java155
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WholePackedObjectLoader.java107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCache.java264
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCacheConfig.java176
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WindowCursor.java180
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkDirCheckout.java406
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WriteTree.java95
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeStrategy.java141
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java235
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyOneSided.java105
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java193
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMergeStrategy.java52
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMerger.java136
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java149
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java246
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java324
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java714
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java115
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java383
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java382
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java273
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java166
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java196
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotLane.java72
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java139
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java156
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java144
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java169
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java134
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java161
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java99
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/EndGenerator.java62
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java165
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java84
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java83
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java151
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java106
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java121
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java224
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java432
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java182
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevBlob.java67
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java529
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java359
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java101
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java154
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java218
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java125
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevSort.java90
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java221
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTree.java67
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java1085
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java188
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteTreeFilter.java216
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java173
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java129
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java184
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java116
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java167
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java116
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java116
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/NotRevFilter.java93
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java182
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java146
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java232
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java161
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java125
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java795
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java109
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java100
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java287
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java538
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java296
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java273
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java203
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java110
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java391
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java115
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java149
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java175
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchConnection.java177
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java95
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java451
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpTransport.java69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java1107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/LongMap.java158
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java400
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java139
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackTransport.java61
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java115
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java139
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java103
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java83
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java100
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java114
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java242
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushResult.java92
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java229
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java913
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java195
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java463
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java508
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java360
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java235
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java99
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java156
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigSessionFactory.java236
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java130
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java153
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java110
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TcpTransport.java69
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java141
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java932
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java336
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundle.java62
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java103
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleStream.java121
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java197
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java392
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java282
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java407
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java432
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java366
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java486
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java194
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java878
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java382
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java513
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkTransport.java63
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java595
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java368
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java135
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java175
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java312
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java921
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java457
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java196
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotTreeFilter.java99
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java194
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java113
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java206
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java103
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java225
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java1475
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java184
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java5.java60
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java6.java107
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java74
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java121
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java171
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java134
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/MutableInteger.java50
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/NB.java368
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/QuotedString.java368
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java97
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java1016
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java137
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java121
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java153
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java334
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java222
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java139
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java152
-rw-r--r--tag_jgit.sh79
561 files changed, 103222 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..f57840b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.java diff=java
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d73c610
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/jgit
+/jgit.jar
+/jgit_src.zip
+/jgit_docs.zip
+/org.eclipse.jgit/lib/jsch-*.jar
+/org.eclipse.jgit.pgm/lib/args4j-*.jar
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a628e2e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,42 @@
+/*
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
diff --git a/README b/README
new file mode 100644
index 0000000..a39adb0
--- /dev/null
+++ b/README
@@ -0,0 +1,122 @@
+ == Java GIT ==
+
+This package is licensed under the BSD.
+
+ org.eclipse.jgit/
+
+ A pure Java library capable of being run standalone, with no
+ additional support libraries. Some JUnit tests are provided
+ to exercise the library. The library provides functions to
+ read and write a GIT formatted repository.
+
+ All portions of jgit are covered by the BSD. Absolutely no GPL,
+ LGPL or EPL contributions are accepted within this package.
+
+ org.eclipse.jgit.test/
+ Unit tests for org.eclipse.jgit and the same licensing rules.
+
+ == WARNINGS / CAVEATS ==
+
+- Symbolic links are not supported because java does not support it.
+ Such links could be damaged.
+
+- Only the timestamp of the index is used by jgit check if the index
+ is dirty.
+
+- Don't try the library with a JDK other than 1.6 (Java 6) unless you
+ are prepared to investigate problems yourself. JDK 1.5.0_11 and later
+ Java 5 versions *may* work. Earlier versions do not. JDK 1.4 is *not*
+ supported. Apple's Java 1.5.0_07 is reported to work acceptably. We
+ have no information about other vendors. Please report your findings
+ if you try.
+
+- CRLF conversion is never performed. On Windows you should thereforc
+ make sure your projects and workspaces are configured to save files
+ with Unix (LF) line endings.
+
+ == Package Features ==
+
+ org.eclipse.jgit/
+
+ * Read loose and packed commits, trees, blobs, including
+ deltafied objects.
+
+ * Read objects from shared repositories
+
+ * Write loose commits, trees, blobs.
+
+ * Write blobs from local files or Java InputStreams.
+
+ * Read blobs as Java InputStreams.
+
+ * Copy trees to local directory, or local directory to a tree.
+
+ * Lazily loads objects as necessary.
+
+ * Read and write .git/config files.
+
+ * Create a new repository.
+
+ * Read and write refs, including walking through symrefs.
+
+ * Read, update and write the Git index.
+
+ * Checkout in dirty working directory if trivial.
+
+ * Walk the history from a given set of commits looking for commits
+ introducing changes in files under a specified path.
+
+ * Object transport
+ Fetch via ssh, git, http, Amazon S3 and bundles.
+ Push via ssh, git and Amazon S3. JGit does not yet deltify
+ the pushed packs so they may be a lot larger than C Git packs.
+
+ org.eclipse.jgit.pgm/
+
+ * Assorted set of command line utilities. Mostly for ad-hoc testing of jgit
+ log, glog, fetch etc.
+
+ == Missing Features ==
+
+There are a lot of missing features. You need the real Git for this.
+For some operations it may just be the preferred solution also. There
+are not just a command line, there is e.g. git-gui that makes committing
+partial files simple.
+
+- Merging.
+
+- Repacking.
+
+- Generate a GIT format patch.
+
+- Apply a GIT format patch.
+
+- Documentation. :-)
+
+- gitattributes support
+ In particular CRLF conversion is not implemented. Files are treated
+ as byte sequences.
+
+- submodule support
+ Submodules are not supported or even recognized.
+
+ == Support ==
+
+ Post question, comments or patches to the git@vger.kernel.org mailing list.
+
+
+ == Contributing ==
+
+ See SUBMITTING_PATCHES in this directory. However, feedback and bug reports
+ are also contributions.
+
+
+ == About GIT ==
+
+More information about GIT, its repository format, and the canonical
+C based implementation can be obtained from the GIT websites:
+
+ http://git.or.cz/
+ http://www.kernel.org/pub/software/scm/git/
+ http://www.kernel.org/pub/software/scm/git/docs/
+
diff --git a/SUBMITTING_PATCHES b/SUBMITTING_PATCHES
new file mode 100644
index 0000000..82d2c25
--- /dev/null
+++ b/SUBMITTING_PATCHES
@@ -0,0 +1,366 @@
+Short Version:
+
+ - Make small logical changes.
+ - Provide a meaningful commit message.
+
+ - Include your Signed-Off-By line to note you agree with the
+ Developer's Certificate of Origin (see below).
+ - Make sure all code is under the proper license:
+
+ 3-clause BSD
+
+ - Use a subject prefix of "[PATCH JGIT ...]" when sending any
+ patches directly by email.
+
+ - Send by email to the maintainers, cc'ing the git mailing list
+ which is currently used for both Git and JGit:
+
+ maintainers : "Shawn O. Pearce" <spearce@spearce.org>
+ Robin Rosenberg <robin.rosenberg@dewire.com>
+
+ git list : git@vger.kernel.org
+
+ git list info : http://vger.kernel.org/vger-lists.html#git
+
+Long Version:
+
+I wanted a file describing how to submit patches for JGit,
+so I started with the one found in the core Git distribution
+(Documentation/SubmittingPatches), which itself was based on the
+patch submission guidelines for the Linux kernel.
+
+However there are some differences, so please review and familiarize
+yourself with the following relevant bits:
+
+
+(1) Make separate commits for logically separate changes.
+
+Unless your patch is really trivial, you should not be sending
+out a patch that was generated between your working tree and your
+commit head. Instead, always make a commit with complete commit
+message and generate a series of patches from your repository.
+It is a good discipline.
+
+Describe the technical detail of the change(s).
+
+If your description starts to get too long, that's a sign that you
+probably need to split up your commit to finer grained pieces.
+
+I am very picky about formatting. Make sure your final version
+of every file was formatted using the Eclipse code formatter
+using the project specific settings (Properties->Java Code
+Style->Formatter->"Java Conventions [built-in]").
+
+
+(2) Generate your patch using git tools out of your commits.
+
+git based diff tools (git, and StGIT included) generate unidiff,
+which is the only acceptable format.
+
+You do not have to be afraid to use -M option to "git diff" or "git
+format-patch", if your patch involves file renames. The receiving
+end can handle them just fine.
+
+Please make sure your patch does not include any extra files which
+do not belong in a patch submission. Make sure to review your
+patch after generating it, to ensure accuracy. Before sending out,
+please make sure it cleanly applies to the "master" branch head.
+
+
+(3) Sending your patches.
+
+People on the git mailing list need to be able to read and comment
+on the changes you are submitting. It is important for a developer
+to be able to "quote" your changes, using standard e-mail tools, so
+that they may comment on specific portions of your code. For this
+reason, all patches should be submitted "inline". WARNING: Be wary
+of your MUAs word-wrap corrupting your patch. Do not cut-n-paste
+your patch; you can lose tabs that way if you are not careful.
+
+It is a common convention to prefix your subject line with [PATCH].
+This lets people easily distinguish patches from other e-mail
+discussions.
+
+"git format-patch" command follows the best current practice to
+format the body of an e-mail message. At the beginning of the patch
+should come your commit message, ending with the Signed-off-by:
+lines, and a line that consists of three dashes, followed by the
+diffstat information and the patch itself. If you are forwarding a
+patch from somebody else, optionally, at the beginning of the e-mail
+message just before the commit message starts, you can put a "From:
+" line to name that person.
+
+You often want to add additional explanation about the patch,
+other than the commit message itself. Place such "cover letter"
+material between the three dash lines and the diffstat.
+
+Do not attach the patch as a MIME attachment, compressed or not.
+Do not let your e-mail client send quoted-printable. Do not let your
+e-mail client send format=flowed which would destroy whitespaces
+in your patches. Many popular e-mail applications will not always
+transmit a MIME attachment as plain text, making it impossible to
+comment on your code. A MIME attachment also takes a bit more
+time to process. This does not decrease the likelihood of your
+MIME-attached change being accepted, but it makes it more likely
+that it will be postponed.
+
+Exception: If your mailer is mangling patches then someone may ask
+you to re-send them using MIME, that is OK.
+
+Do not PGP sign your patch, at least for now. Most likely, your
+maintainer or other people on the list would not have your PGP
+key and would not bother obtaining it anyway. Your patch is not
+judged by who you are; a good patch from an unknown origin has a
+far better chance of being accepted than a patch from a known,
+respected origin that is done poorly or does incorrect things.
+
+If you really really really really want to do a PGP signed
+patch, format it as "multipart/signed", not a text/plain message
+that starts with '-----BEGIN PGP SIGNED MESSAGE-----'. That is
+not a text/plain, it's something else.
+
+Note that your maintainer does not necessarily read everything
+on the git mailing list. If your patch is for discussion first,
+send it "To:" the mailing list, and optionally "cc:" him. If it
+is trivially correct or after the list reached a consensus, send it
+"To:" the maintainer and optionally "cc:" the list.
+
+
+(4) Check the license
+
+JGit is licensed under the 3-clause (new-style) BSD.
+
+Because of this licensing model *every* file within the project
+*must* list which license covers it in the header of the file.
+Any new contributions to an existing file *must* be submitted under
+the current license of that file. Any new files *must* clearly
+indicate which license they are provided under in the file header.
+
+Please verify that you are legally allowed and willing to submit your
+changes under the license covering each file *prior* to submitting
+your patch. It is virtually impossible to remove a patch once it
+has been applied and pushed out.
+
+
+(5) Sign your work
+
+To improve tracking of who did what, we've borrowed the "sign-off"
+procedure from the Linux kernel project on patches that are being
+emailed around. Although JGit is a lot smaller project it is
+a good discipline to follow it.
+
+The sign-off is a simple line at the end of the explanation for the
+patch, which certifies that you wrote it or otherwise have the right
+to pass it on as a open-source patch. The rules are pretty simple:
+if you can certify the below:
+
+ Developer's Certificate of Origin 1.1
+
+ By making a contribution to this project, I certify that:
+
+ (a) The contribution was created in whole or in part by me
+ and I have the right to submit it under the open source
+ license indicated in the file; or
+
+ (b) The contribution is based upon previous work that, to the
+ best of my knowledge, is covered under an appropriate
+ open source license and I have the right under that
+ license to submit that work with modifications, whether
+ created in whole or in part by me, under the same open
+ source license (unless I am permitted to submit under
+ a different license), as indicated in the file; or
+
+ (c) The contribution was provided directly to me by some
+ other person who certified (a), (b) or (c) and I have
+ not modified it.
+
+ (d) I understand and agree that this project and the
+ contribution are public and that a record of the
+ contribution (including all personal information I
+ submit with it, including my sign-off) is maintained
+ indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+then you just add a line saying
+
+ Signed-off-by: Random J Developer <random@developer.example.org>
+
+This line can be automatically added by git if you run the git-commit
+command with the -s option.
+
+Some people also put extra tags at the end. They'll just be ignored
+for now, but you can do this to mark internal company procedures
+or just point out some special detail about the sign-off.
+
+
+------------------------------------------------
+MUA specific hints
+
+Some of patches I receive or pick up from the list share common
+patterns of breakage. Please make sure your MUA is set up
+properly not to corrupt whitespaces. Here are two common ones
+I have seen:
+
+* Empty context lines that do not have _any_ whitespace.
+
+* Non empty context lines that have one extra whitespace at the
+ beginning.
+
+One test you could do yourself if your MUA is set up correctly is:
+
+* Send the patch to yourself, exactly the way you would, except
+ To: and Cc: lines, which would not contain the list and
+ maintainer address.
+
+* Save that patch to a file in UNIX mailbox format. Call it say
+ a.patch.
+
+* Try to apply to the tip of the "master" branch from the
+ egit.git public repository:
+
+ $ git fetch git://repo.or.cz/egit.git master:test-apply
+ $ git checkout test-apply
+ $ git reset --hard
+ $ git am a.patch
+
+If it does not apply correctly, there can be various reasons.
+
+* Your patch itself does not apply cleanly. That is _bad_ but
+ does not have much to do with your MUA. Please rebase the
+ patch appropriately.
+
+* Your MUA corrupted your patch; applymbox would complain that
+ the patch does not apply. Look at .dotest/ subdirectory and
+ see what 'patch' file contains and check for the common
+ corruption patterns mentioned above.
+
+* While you are at it, check what are in 'info' and
+ 'final-commit' files as well. If what is in 'final-commit' is
+ not exactly what you would want to see in the commit log
+ message, it is very likely that your maintainer would end up
+ hand editing the log message when he applies your patch.
+ Things like "Hi, this is my first patch.\n", if you really
+ want to put in the patch e-mail, should come after the
+ three-dash line that signals the end of the commit message.
+
+
+Pine
+----
+
+(Johannes Schindelin)
+
+I don't know how many people still use pine, but for those poor
+souls it may be good to mention that the quell-flowed-text is
+needed for recent versions.
+
+... the "no-strip-whitespace-before-send" option, too. AFAIK it
+was introduced in 4.60.
+
+(Linus Torvalds)
+
+And 4.58 needs at least this.
+
+---
+diff-tree 8326dd8350be64ac7fc805f6563a1d61ad10d32c (from e886a61f76edf5410573e92e38ce22974f9c40f1)
+Author: Linus Torvalds <torvalds@g5.osdl.org>
+Date: Mon Aug 15 17:23:51 2005 -0700
+
+ Fix pine whitespace-corruption bug
+
+ There's no excuse for unconditionally removing whitespace from
+ the pico buffers on close.
+
+diff --git a/pico/pico.c b/pico/pico.c
+--- a/pico/pico.c
++++ b/pico/pico.c
+@@ -219,7 +219,9 @@ PICO *pm;
+ switch(pico_all_done){ /* prepare for/handle final events */
+ case COMP_EXIT : /* already confirmed */
+ packheader();
++#if 0
+ stripwhitespace();
++#endif
+ c |= COMP_EXIT;
+ break;
+
+
+(Daniel Barkalow)
+
+> A patch to SubmittingPatches, MUA specific help section for
+> users of Pine 4.63 would be very much appreciated.
+
+Ah, it looks like a recent version changed the default behavior to do the
+right thing, and inverted the sense of the configuration option. (Either
+that or Gentoo did it.) So you need to set the
+"no-strip-whitespace-before-send" option, unless the option you have is
+"strip-whitespace-before-send", in which case you should avoid checking
+it.
+
+
+Thunderbird
+-----------
+
+(A Large Angry SCM)
+
+Here are some hints on how to successfully submit patches inline using
+Thunderbird.
+
+This recipe appears to work with the current [*1*] Thunderbird from Suse.
+
+The following Thunderbird extensions are needed:
+ AboutConfig 0.5
+ http://aboutconfig.mozdev.org/
+ External Editor 0.7.2
+ http://globs.org/articles.php?lng=en&pg=8
+
+1) Prepare the patch as a text file using your method of choice.
+
+2) Before opening a compose window, use Edit->Account Settings to
+uncheck the "Compose messages in HTML format" setting in the
+"Composition & Addressing" panel of the account to be used to send the
+patch. [*2*]
+
+3) In the main Thunderbird window, _before_ you open the compose window
+for the patch, use Tools->about:config to set the following to the
+indicated values:
+ mailnews.send_plaintext_flowed => false
+ mailnews.wraplength => 0
+
+4) Open a compose window and click the external editor icon.
+
+5) In the external editor window, read in the patch file and exit the
+editor normally.
+
+6) Back in the compose window: Add whatever other text you wish to the
+message, complete the addressing and subject fields, and press send.
+
+7) Optionally, undo the about:config/account settings changes made in
+steps 2 & 3.
+
+
+[Footnotes]
+*1* Version 1.0 (20041207) from the MozillaThunderbird-1.0-5 rpm of Suse
+9.3 professional updates.
+
+*2* It may be possible to do this with about:config and the following
+settings but I haven't tried, yet.
+ mail.html_compose => false
+ mail.identity.default.compose_html => false
+ mail.identity.id?.compose_html => false
+
+
+
+Gnus
+----
+
+'|' in the *Summary* buffer can be used to pipe the current
+message to an external program, and this is a handy way to drive
+"git am". However, if the message is MIME encoded, what is
+piped into the program is the representation you see in your
+*Article* buffer after unwrapping MIME. This is often not what
+you would want for two reasons. It tends to screw up non ASCII
+characters (most notably in people's names), and also
+whitespaces (fatal in patches). Running 'C-u g' to display the
+message in raw form before using '|' to run the pipe can work
+this problem around.
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..c4ce95e
--- /dev/null
+++ b/TODO
@@ -0,0 +1,49 @@
+= JGit Wishlist =
+
+Below are some of the areas that needs work. Also take a look at JGit
+related issues in the EGit project:
+
+ - http://code.google.com/p/egit/issues/list?q=label:Component-JGit
+
+== Switch Branch ==
+
+Switch to an existing branch, updating the working directory to match.
+
+Note that updating the working directory may require a 3 way merge
+if the working directory is dirty (git checkout -m).
+
+My usual git working style is to not switch branches with a dirty
+working directory; I always commit to the current branch before
+switching to a new one. I mention that because I assume it'll be
+easier to implement that workflow first; once you have commit
+capability, you can do that style of branch switching (either
+preventing the switch or doing an implicit commit when the working
+directory is dirty) without having to worry about merging. ''--
+Steven Grimm''
+
+== Merge ==
+
+Merging changes from one local branch to another.
+
+Again, like fetch I'd like to keep egit/jgit 100% pure Java and
+implement merge-recursive in Java. We may need to invoke RCS
+merge if Eclipse doesn't have its own 3 way file merge algorithm
+available, or do what core Git just did and implement a 3 way in
+memory merge algorithm. git-merge-recursive is only 1336 lines of C
+so it should not be too difficult to port the algorithm to pure Java.
+
+== SVN Integration ==
+
+It would be swell -- but put it at the bottom of your priority list
+-- to have git-svn interoperability; sadly most of my git usage at
+the moment is in cloned svn repositories and it would be great if
+egit could do the right thing when the current git repo is cloned
+from svn. What "the right thing" is, exactly, is debatable, but I
+suppose some kind of integration with the Subclipse plugin is one
+possibility (and if nothing else, that plugin probably has code
+that can be reused.) I'd like to be able to update from and commit
+to the parent svn repository. ''-- Steven Grimm''
+
+I'm considering this to be out of scope for the time being, but if
+someone takes it on and submits reasonable patches we'll include
+them. ''-- Shawn Pearce''
diff --git a/jgit-maven/.gitignore b/jgit-maven/.gitignore
new file mode 100644
index 0000000..eb5a316
--- /dev/null
+++ b/jgit-maven/.gitignore
@@ -0,0 +1 @@
+target
diff --git a/jgit-maven/jgit/pom.xml b/jgit-maven/jgit/pom.xml
new file mode 100644
index 0000000..2679977
--- /dev/null
+++ b/jgit-maven/jgit/pom.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2008, Imran M Yousuf <imyousuf@smartitengineering.com>
+ and other copyright owners as documented in the project's IP log.
+
+ This program and the accompanying materials are made available
+ under the terms of the Eclipse Distribution License v1.0 which
+ accompanies this distribution, is reproduced below, and is
+ available at http://www.eclipse.org/org/documents/edl-v10.php
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ - Neither the name of the Eclipse Foundation, Inc. nor the
+ names of its contributors may be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>jgit</artifactId>
+ <packaging>jar</packaging>
+ <version>0.5.0-SNAPSHOT</version>
+ <name>jgit</name>
+ <url>http://repo.or.cz/w/jgit.git</url>
+ <mailingLists>
+ <mailingList>
+ <name>GIT Mailing List</name>
+ <post>git@vger.kernel.org</post>
+ <archive>http://marc.info/?l=git</archive>
+ </mailingList>
+ </mailingLists>
+ <description>Pure Java implementation of Git</description>
+ <developers>
+ <developer>
+ <name>Shawn O. Pearce</name>
+ <email>spearce@spearce.org</email>
+ <roles>
+ <role>Maintainer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Robin Rosenberg</name>
+ <email>robin.rosenberg@dewire.com</email>
+ <roles>
+ <role>Maintainer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Dave Watson</name>
+ <email>dwatson@mimvista.com</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Roger C. Soares</name>
+ <email>rogersoares@intelinet.com.br</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Marek Zawirski</name>
+ <email>marek.zawirski@gmail.com</email>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Charles O'Farrell</name>
+ <email>charleso@charleso.org</email>
+ <roles>
+ <role>Contributor</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Imran M Yousuf</name>
+ <email>imyousuf@smartitengineering.com</email>
+ <organization>Smart IT Engineering</organization>
+ <roles>
+ <role>Contributor</role>
+ </roles>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>Eclipse Distribution License (New BSD License)</name>
+ <comments>
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ Neither the name of the Eclipse Foundation, Inc. nor the
+ names of its contributors may be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ </comments>
+ </license>
+ </licenses>
+ <build>
+ <sourceDirectory>../../org.eclipse.jgit/src/</sourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>../../org.eclipse.jgit.test/tst-rsrc/</directory>
+ </testResource>
+ </testResources>
+ <testSourceDirectory>../../org.eclipse.jgit.test/tst/</testSourceDirectory>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.2</version>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/*TestCase.java</include>
+ <include>**/T000*.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.jcraft</groupId>
+ <artifactId>jsch</artifactId>
+ <version>0.1.41</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ <distributionManagement>
+ <snapshotRepository>
+ <id>jgit-maven-snapshot-repository</id>
+ <name>JGit Maven Snapshot Repository</name>
+ <url>dav:https://egit.googlecode.com/svn/maven/snapshot-repository/</url>
+ <uniqueVersion>true</uniqueVersion>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
diff --git a/jgit.sh b/jgit.sh
new file mode 100644
index 0000000..76b5829
--- /dev/null
+++ b/jgit.sh
@@ -0,0 +1,94 @@
+#!/bin/sh
+# Copyright (C) 2008-2009, Google Inc.
+# Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+# and other copyright owners as documented in the project's IP log.
+#
+# This program and the accompanying materials are made available
+# under the terms of the Eclipse Distribution License v1.0 which
+# accompanies this distribution, is reproduced below, and is
+# available at http://www.eclipse.org/org/documents/edl-v10.php
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+#
+# - Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# - Neither the name of the Eclipse Foundation, Inc. nor the
+# names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+if [ "@@use_self@@" = "1" ]
+then
+ this_script=`which "$0" 2>/dev/null`
+ [ $? -gt 0 -a -f "$0" ] && this_script="$0"
+ cp=$this_script
+else
+ jgit_home=`dirname $0`
+ cp="$jgit_home/org.eclipse.jgit/bin"
+ cp="$cp:$jgit_home/org.eclipse.jgit/lib/jsch-0.1.37.jar"
+ cp="$cp:$jgit_home/org.eclipse.jgit.pgm/bin"
+ cp="$cp:$jgit_home/org.eclipse.jgit.pgm/lib/args4j-2.0.9.jar"
+ unset jgit_home
+ java_args=
+fi
+
+if [ -n "$JGIT_CLASSPATH" ]
+then
+ cp="$cp:$JGIT_CLASSPATH"
+fi
+
+# Cleanup paths for Cygwin.
+#
+case "`uname`" in
+CYGWIN*)
+ cp=`cygpath --windows --mixed --path "$cp"`
+ ;;
+Darwin)
+ if test -e /System/Library/Frameworks/JavaVM.framework
+ then
+ java_args='
+ -Dcom.apple.mrj.application.apple.menu.about.name=JGit
+ -Dcom.apple.mrj.application.growbox.intrudes=false
+ -Dapple.laf.useScreenMenuBar=true
+ -Xdock:name=JGit
+ '
+ fi
+ ;;
+esac
+
+CLASSPATH="$cp"
+export CLASSPATH
+
+java=java
+if test -n "$JAVA_HOME"
+then
+ java="$JAVA_HOME/bin/java"
+fi
+
+exec "$java" $java_args org.eclipse.jgit.pgm.Main "$@"
+exit 1
diff --git a/make_jgit.sh b/make_jgit.sh
new file mode 100644
index 0000000..ae94643
--- /dev/null
+++ b/make_jgit.sh
@@ -0,0 +1,179 @@
+#!/bin/sh
+# Copyright (C) 2009, Christian Halstrick <christian.halstrick@sap.com>
+# Copyright (C) 2008-2009, Google Inc.
+# Copyright (C) 2009, Johannes Schindelin <Johannes.Schindelin@gmx.de>
+# Copyright (C) 2008, Mike Ralphson <mike@abacus.co.uk>
+# Copyright (C) 2009, Nicholas Campbell <nicholas.j.campbell@gmail.com>
+# Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@gmail.com>
+# Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+# and other copyright owners as documented in the project's IP log.
+#
+# This program and the accompanying materials are made available
+# under the terms of the Eclipse Distribution License v1.0 which
+# accompanies this distribution, is reproduced below, and is
+# available at http://www.eclipse.org/org/documents/edl-v10.php
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+#
+# - Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# - Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# - Neither the name of the Eclipse Foundation, Inc. nor the
+# names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+O_CLI=jgit
+O_JAR=jgit.jar
+O_SRC=jgit_src.zip
+O_DOC=jgit_docs.zip
+
+PLUGINS="
+ org.eclipse.jgit
+ org.eclipse.jgit.pgm
+"
+JARS="
+ org.eclipse.jgit/lib/jsch-0.1.37.jar
+ org.eclipse.jgit.pgm/lib/args4j-2.0.9.jar
+"
+
+PSEP=":"
+T=".temp$$.$O_CLI"
+T_MF="$T.MF"
+R=`pwd`
+if [ "$OSTYPE" = "cygwin" ]
+then
+ R=`cygpath -m $R`
+ PSEP=";"
+fi
+if [ "$MSYSTEM" = "MINGW" -o "$MSYSTEM" = "MINGW32" ]
+then
+ PSEP=";"
+ R=`pwd -W`
+fi
+
+if [ -n "$JAVA_HOME" ]
+then
+ PATH=${JAVA_HOME}/bin${PSEP}${PATH}
+fi
+
+cleanup_bin() {
+ rm -f $T $O_CLI+ $O_JAR+ $O_SRC+ $T_MF
+ for p in $PLUGINS
+ do
+ rm -rf $p/bin2
+ done
+ rm -rf docs
+}
+
+die() {
+ cleanup_bin
+ rm -f $O_CLI $O_JAR $O_SRC
+ echo >&2 "$@"
+ exit 1
+}
+
+cleanup_bin
+rm -f $O_CLI $O_JAR $O_SRC $O_DOC
+
+VN=`git describe --abbrev=4 HEAD 2>/dev/null`
+git update-index -q --refresh
+if [ -n "`git diff-index --name-only HEAD --`" ]
+then
+ VN="$VN-dirty"
+fi
+VN=${VN:-untagged}`echo "$VN" | sed -e s/-/./g`
+
+CLASSPATH=
+for j in $JARS
+do
+ if [ -z "$CLASSPATH" ]
+ then
+ CLASSPATH="$R/$j"
+ else
+ CLASSPATH="${CLASSPATH}${PSEP}$R/$j"
+ fi
+done
+export CLASSPATH
+
+for p in $PLUGINS
+do
+ echo "Entering $p ..."
+ (cd $p/src &&
+ mkdir ../bin2 &&
+ find . -name \*.java -type f |
+ xargs javac \
+ -source 1.5 \
+ -target 1.5 \
+ -encoding UTF-8 \
+ -g \
+ -d ../bin2) || die "Building $p failed."
+ CLASSPATH="${CLASSPATH}${PSEP}$R/$p/bin2"
+done
+echo
+
+echo "Version $VN" &&
+echo Manifest-Version: 1.0 >$T_MF &&
+echo Implementation-Title: jgit >>$T_MF &&
+echo Implementation-Version: $VN >>$T_MF &&
+
+java org.eclipse.jgit.pgm.build.JarLinkUtil \
+ -include org.eclipse.jgit/bin2 \
+ -file META-INF/MANIFEST.MF=$T_MF \
+ >$O_JAR+ &&
+mv $O_JAR+ $O_JAR &&
+echo "Created $O_JAR." &&
+
+java org.eclipse.jgit.pgm.build.JarLinkUtil \
+ -include org.eclipse.jgit/src \
+ -file META-INF/MANIFEST.MF=$T_MF \
+ >$O_SRC+ &&
+mv $O_SRC+ $O_SRC &&
+echo "Created $O_SRC." &&
+
+M_TB=META-INF/services/org.eclipse.jgit.pgm.TextBuiltin &&
+sed s/@@use_self@@/1/ jgit.sh >$O_CLI+ &&
+java org.eclipse.jgit.pgm.build.JarLinkUtil \
+ `for p in $JARS ; do printf %s " -include $p" ;done` \
+ `for p in $PLUGINS; do printf %s " -include $p/bin2";done` \
+ -file $M_TB=org.eclipse.jgit.pgm/src/$M_TB \
+ -file META-INF/MANIFEST.MF=$T_MF \
+ >>$O_CLI+ &&
+chmod 555 $O_CLI+ &&
+mv $O_CLI+ $O_CLI &&
+echo "Created $O_CLI." || die "Build failed."
+
+echo "Building Javadocs ..."
+for p in $PLUGINS; do
+ javadoc -quiet -sourcepath "$p/src/" -d "docs/$p/" \
+ `find "$p/src" -name "*.java"`
+done
+
+(cd docs && jar cf "../$O_DOC" .)
+echo "Created $O_DOC."
+
+cleanup_bin
diff --git a/org.eclipse.jgit.pgm/.classpath b/org.eclipse.jgit.pgm/.classpath
new file mode 100644
index 0000000..a91b30e
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry exported="true" kind="lib" path="lib/args4j-2.0.9.jar" sourcepath="lib/args4j-2.0.9.zip"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" exported="true" kind="src" path="/org.eclipse.jgit"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jgit.pgm/.gitignore b/org.eclipse.jgit.pgm/.gitignore
new file mode 100644
index 0000000..5e56e04
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/org.eclipse.jgit.pgm/.project b/org.eclipse.jgit.pgm/.project
new file mode 100644
index 0000000..bbaafc2
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jgit.pgm</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..759548b
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 11 16:46:23 PDT 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..006e07e
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Mon Mar 24 18:55:50 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f0c80d3
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,321 @@
+#Sun Mar 15 19:46:39 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..709a440
--- /dev/null
+++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,9 @@
+#Wed May 09 00:20:24 CEST 2007
+eclipse.preferences.version=1
+formatter_profile=_JGit
+formatter_settings_version=10
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin b/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
new file mode 100644
index 0000000..9c8933f
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
@@ -0,0 +1,30 @@
+org.eclipse.jgit.pgm.Branch
+org.eclipse.jgit.pgm.Clone
+org.eclipse.jgit.pgm.Daemon
+org.eclipse.jgit.pgm.DiffTree
+org.eclipse.jgit.pgm.Fetch
+org.eclipse.jgit.pgm.Glog
+org.eclipse.jgit.pgm.IndexPack
+org.eclipse.jgit.pgm.Init
+org.eclipse.jgit.pgm.Log
+org.eclipse.jgit.pgm.LsRemote
+org.eclipse.jgit.pgm.LsTree
+org.eclipse.jgit.pgm.MergeBase
+org.eclipse.jgit.pgm.Push
+org.eclipse.jgit.pgm.ReceivePack
+org.eclipse.jgit.pgm.RevList
+org.eclipse.jgit.pgm.RevParse
+org.eclipse.jgit.pgm.Rm
+org.eclipse.jgit.pgm.ShowRev
+org.eclipse.jgit.pgm.ShowRef
+org.eclipse.jgit.pgm.Tag
+org.eclipse.jgit.pgm.UploadPack
+org.eclipse.jgit.pgm.Version
+
+org.eclipse.jgit.pgm.debug.MakeCacheTree
+org.eclipse.jgit.pgm.debug.ReadDirCache
+org.eclipse.jgit.pgm.debug.RebuildCommitGraph
+org.eclipse.jgit.pgm.debug.ShowCacheTree
+org.eclipse.jgit.pgm.debug.ShowCommands
+org.eclipse.jgit.pgm.debug.ShowDirCache
+org.eclipse.jgit.pgm.debug.WriteDirCache
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
new file mode 100644
index 0000000..f5e3c50
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2008, Charles O'Farrell <charleso@charleso.org>
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.transport.FetchResult;
+import org.eclipse.jgit.transport.TrackingRefUpdate;
+import org.eclipse.jgit.transport.Transport;
+
+abstract class AbstractFetchCommand extends TextBuiltin {
+ @Option(name = "--verbose", aliases = { "-v" }, usage = "be more verbose")
+ private boolean verbose;
+
+ protected void showFetchResult(final Transport tn, final FetchResult r) {
+ boolean shownURI = false;
+ for (final TrackingRefUpdate u : r.getTrackingRefUpdates()) {
+ if (!verbose && u.getResult() == RefUpdate.Result.NO_CHANGE)
+ continue;
+
+ final char type = shortTypeOf(u.getResult());
+ final String longType = longTypeOf(u);
+ final String src = abbreviateRef(u.getRemoteName(), false);
+ final String dst = abbreviateRef(u.getLocalName(), true);
+
+ if (!shownURI) {
+ out.print("From ");
+ out.print(tn.getURI());
+ out.println();
+ shownURI = true;
+ }
+
+ out.format(" %c %-17s %-10s -> %s", type, longType, src, dst);
+ out.println();
+ }
+ }
+
+ private String longTypeOf(final TrackingRefUpdate u) {
+ final RefUpdate.Result r = u.getResult();
+ if (r == RefUpdate.Result.LOCK_FAILURE)
+ return "[lock fail]";
+ if (r == RefUpdate.Result.IO_FAILURE)
+ return "[i/o error]";
+ if (r == RefUpdate.Result.REJECTED)
+ return "[rejected]";
+ if (ObjectId.zeroId().equals(u.getNewObjectId()))
+ return "[deleted]";
+
+ if (r == RefUpdate.Result.NEW) {
+ if (u.getRemoteName().startsWith(Constants.R_HEADS))
+ return "[new branch]";
+ else if (u.getLocalName().startsWith(Constants.R_TAGS))
+ return "[new tag]";
+ return "[new]";
+ }
+
+ if (r == RefUpdate.Result.FORCED) {
+ final String aOld = u.getOldObjectId().abbreviate(db).name();
+ final String aNew = u.getNewObjectId().abbreviate(db).name();
+ return aOld + "..." + aNew;
+ }
+
+ if (r == RefUpdate.Result.FAST_FORWARD) {
+ final String aOld = u.getOldObjectId().abbreviate(db).name();
+ final String aNew = u.getNewObjectId().abbreviate(db).name();
+ return aOld + ".." + aNew;
+ }
+
+ if (r == RefUpdate.Result.NO_CHANGE)
+ return "[up to date]";
+ return "[" + r.name() + "]";
+ }
+
+ private static char shortTypeOf(final RefUpdate.Result r) {
+ if (r == RefUpdate.Result.LOCK_FAILURE)
+ return '!';
+ if (r == RefUpdate.Result.IO_FAILURE)
+ return '!';
+ if (r == RefUpdate.Result.NEW)
+ return '*';
+ if (r == RefUpdate.Result.FORCED)
+ return '+';
+ if (r == RefUpdate.Result.FAST_FORWARD)
+ return ' ';
+ if (r == RefUpdate.Result.REJECTED)
+ return '!';
+ if (r == RefUpdate.Result.NO_CHANGE)
+ return '=';
+ return ' ';
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
new file mode 100644
index 0000000..60dbe27
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright (C) 2007-2008, Charles O'Farrell <charleso@charleso.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.ExampleMode;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.RefComparator;
+import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.RefUpdate.Result;
+import org.eclipse.jgit.pgm.opt.CmdLineParser;
+import org.eclipse.jgit.revwalk.RevWalk;
+
+@Command(common = true, usage = "List, create, or delete branches")
+class Branch extends TextBuiltin {
+
+ @Option(name = "--remote", aliases = { "-r" }, usage = "act on remote-tracking branches")
+ private boolean remote = false;
+
+ @Option(name = "--all", aliases = { "-a" }, usage = "list both remote-tracking and local branches")
+ private boolean all = false;
+
+ @Option(name = "--delete", aliases = { "-d" }, usage = "delete fully merged branch")
+ private boolean delete = false;
+
+ @Option(name = "--delete-force", aliases = { "-D" }, usage = "delete branch (even if not merged)")
+ private boolean deleteForce = false;
+
+ @Option(name = "--create-force", aliases = { "-f" }, usage = "force create branch even exists")
+ private boolean createForce = false;
+
+ @Option(name = "--verbose", aliases = { "-v" }, usage = "be verbose")
+ private boolean verbose = false;
+
+ @Argument
+ private List<String> branches = new ArrayList<String>();
+
+ private final Map<String, Ref> printRefs = new LinkedHashMap<String, Ref>();
+
+ /** Only set for verbose branch listing at-the-moment */
+ private RevWalk rw;
+
+ private int maxNameLength;
+
+ @Override
+ protected void run() throws Exception {
+ if (delete || deleteForce)
+ delete(deleteForce);
+ else {
+ if (branches.size() > 2)
+ throw die("Too many refs given\n" + new CmdLineParser(this).printExample(ExampleMode.ALL));
+
+ if (branches.size() > 0) {
+ String newHead = branches.get(0);
+ String startBranch;
+ if (branches.size() == 2)
+ startBranch = branches.get(1);
+ else
+ startBranch = Constants.HEAD;
+ Ref startRef = db.getRef(startBranch);
+ ObjectId startAt = db.resolve(startBranch + "^0");
+ if (startRef != null)
+ startBranch = startRef.getName();
+ else
+ startBranch = startAt.name();
+ startBranch = db.shortenRefName(startBranch);
+ String newRefName = newHead;
+ if (!newRefName.startsWith(Constants.R_HEADS))
+ newRefName = Constants.R_HEADS + newRefName;
+ if (!Repository.isValidRefName(newRefName))
+ throw die(String.format("%s is not a valid ref name", newRefName));
+ if (!createForce && db.resolve(newRefName) != null)
+ throw die(String.format("branch %s already exists", newHead));
+ RefUpdate updateRef = db.updateRef(newRefName);
+ updateRef.setNewObjectId(startAt);
+ updateRef.setForceUpdate(createForce);
+ updateRef.setRefLogMessage("branch: Created from " + startBranch, false);
+ Result update = updateRef.update();
+ if (update == Result.REJECTED)
+ throw die(String.format("Could not create branch %s: %s", newHead, update.toString()));
+ } else {
+ if (verbose)
+ rw = new RevWalk(db);
+ list();
+ }
+ }
+ }
+
+ private void list() throws Exception {
+ Map<String, Ref> refs = db.getAllRefs();
+ Ref head = refs.get(Constants.HEAD);
+ // This can happen if HEAD is stillborn
+ if (head != null) {
+ String current = head.getName();
+ if (current.equals(Constants.HEAD))
+ addRef("(no branch)", head);
+ addRefs(refs, Constants.R_HEADS, !remote);
+ addRefs(refs, Constants.R_REMOTES, remote);
+ for (final Entry<String, Ref> e : printRefs.entrySet()) {
+ final Ref ref = e.getValue();
+ printHead(e.getKey(), current.equals(ref.getName()), ref);
+ }
+ }
+ }
+
+ private void addRefs(final Map<String, Ref> allRefs, final String prefix,
+ final boolean add) {
+ if (all || add) {
+ for (final Ref ref : RefComparator.sort(allRefs.values())) {
+ final String name = ref.getName();
+ if (name.startsWith(prefix))
+ addRef(name.substring(name.indexOf('/', 5) + 1), ref);
+ }
+ }
+ }
+
+ private void addRef(final String name, final Ref ref) {
+ printRefs.put(name, ref);
+ maxNameLength = Math.max(maxNameLength, name.length());
+ }
+
+ private void printHead(final String ref, final boolean isCurrent,
+ final Ref refObj) throws Exception {
+ out.print(isCurrent ? '*' : ' ');
+ out.print(' ');
+ out.print(ref);
+ if (verbose) {
+ final int spaces = maxNameLength - ref.length() + 1;
+ out.print(String.format("%" + spaces + "s", ""));
+ final ObjectId objectId = refObj.getObjectId();
+ out.print(objectId.abbreviate(db).name());
+ out.print(' ');
+ out.print(rw.parseCommit(objectId).getShortMessage());
+ }
+ out.println();
+ }
+
+ private void delete(boolean force) throws IOException {
+ String current = db.getBranch();
+ ObjectId head = db.resolve(Constants.HEAD);
+ for (String branch : branches) {
+ if (current.equals(branch)) {
+ String err = "Cannot delete the branch '%s' which you are currently on.";
+ throw die(String.format(err, branch));
+ }
+ RefUpdate update = db.updateRef((remote ? Constants.R_REMOTES
+ : Constants.R_HEADS)
+ + branch);
+ update.setNewObjectId(head);
+ update.setForceUpdate(force || remote);
+ Result result = update.delete();
+ if (result == Result.REJECTED) {
+ String err = "The branch '%s' is not an ancestor of your current HEAD.\n"
+ + "If you are sure you want to delete it, run 'jgit branch -D %1$s'.";
+ throw die(String.format(err, branch));
+ } else if (result == Result.NEW)
+ throw die(String.format("branch '%s' not found.", branch));
+ if (remote)
+ out.println(String.format("Deleted remote branch %s", branch));
+ else if (verbose)
+ out.println(String.format("Deleted branch %s", branch));
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
new file mode 100644
index 0000000..605f955
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.errors.NotSupportedException;
+import org.eclipse.jgit.errors.TransportException;
+import org.eclipse.jgit.lib.Commit;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.GitIndex;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.RefComparator;
+import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+import org.eclipse.jgit.lib.Tree;
+import org.eclipse.jgit.lib.WorkDirCheckout;
+import org.eclipse.jgit.transport.FetchResult;
+import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.transport.RemoteConfig;
+import org.eclipse.jgit.transport.Transport;
+import org.eclipse.jgit.transport.URIish;
+
+@Command(common = true, usage = "Clone a repository into a new directory")
+class Clone extends AbstractFetchCommand {
+ @Option(name = "--origin", aliases = { "-o" }, metaVar = "name", usage = "use <name> instead of 'origin' to track upstream")
+ private String remoteName = "origin";
+
+ @Argument(index = 0, required = true, metaVar = "uri-ish")
+ private String sourceUri;
+
+ @Argument(index = 1, metaVar = "directory")
+ private String localName;
+
+ @Override
+ protected final boolean requiresRepository() {
+ return false;
+ }
+
+ @Override
+ protected void run() throws Exception {
+ if (localName != null && gitdir != null)
+ throw die("conflicting usage of --git-dir and arguments");
+
+ final URIish uri = new URIish(sourceUri);
+ if (localName == null) {
+ String p = uri.getPath();
+ while (p.endsWith("/"))
+ p = p.substring(0, p.length() - 1);
+ final int s = p.lastIndexOf('/');
+ if (s < 0)
+ throw die("cannot guess local name from " + sourceUri);
+ localName = p.substring(s + 1);
+ if (localName.endsWith(".git"))
+ localName = localName.substring(0, localName.length() - 4);
+ }
+ if (gitdir == null)
+ gitdir = new File(localName, ".git");
+
+ db = new Repository(gitdir);
+ db.create();
+ db.getConfig().setBoolean("core", null, "bare", false);
+ db.getConfig().save();
+
+ out.println("Initialized empty Git repository in "
+ + gitdir.getAbsolutePath());
+ out.flush();
+
+ saveRemote(uri);
+ final FetchResult r = runFetch();
+ final Ref branch = guessHEAD(r);
+ doCheckout(branch);
+ }
+
+ private void saveRemote(final URIish uri) throws URISyntaxException,
+ IOException {
+ final RemoteConfig rc = new RemoteConfig(db.getConfig(), remoteName);
+ rc.addURI(uri);
+ rc.addFetchRefSpec(new RefSpec().setForceUpdate(true)
+ .setSourceDestination(Constants.R_HEADS + "*",
+ Constants.R_REMOTES + remoteName + "/*"));
+ rc.update(db.getConfig());
+ db.getConfig().save();
+ }
+
+ private FetchResult runFetch() throws NotSupportedException,
+ URISyntaxException, TransportException {
+ final Transport tn = Transport.open(db, remoteName);
+ final FetchResult r;
+ try {
+ r = tn.fetch(new TextProgressMonitor(), null);
+ } finally {
+ tn.close();
+ }
+ showFetchResult(tn, r);
+ return r;
+ }
+
+ private Ref guessHEAD(final FetchResult result) {
+ final Ref idHEAD = result.getAdvertisedRef(Constants.HEAD);
+ final List<Ref> availableRefs = new ArrayList<Ref>();
+ Ref head = null;
+ for (final Ref r : result.getAdvertisedRefs()) {
+ final String n = r.getName();
+ if (!n.startsWith(Constants.R_HEADS))
+ continue;
+ availableRefs.add(r);
+ if (idHEAD == null || head != null)
+ continue;
+ if (r.getObjectId().equals(idHEAD.getObjectId()))
+ head = r;
+ }
+ Collections.sort(availableRefs, RefComparator.INSTANCE);
+ if (idHEAD != null && head == null)
+ head = idHEAD;
+ return head;
+ }
+
+ private void doCheckout(final Ref branch) throws IOException {
+ if (branch == null)
+ throw die("cannot checkout; no HEAD advertised by remote");
+ if (!Constants.HEAD.equals(branch.getName()))
+ db.writeSymref(Constants.HEAD, branch.getName());
+
+ final Commit commit = db.mapCommit(branch.getObjectId());
+ final RefUpdate u = db.updateRef(Constants.HEAD);
+ u.setNewObjectId(commit.getCommitId());
+ u.forceUpdate();
+
+ final GitIndex index = new GitIndex(db);
+ final Tree tree = commit.getTree();
+ final WorkDirCheckout co;
+
+ co = new WorkDirCheckout(db, db.getWorkDir(), index, tree);
+ co.checkout();
+ index.write();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java
new file mode 100644
index 0000000..0562416
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation to document a {@link TextBuiltin}.
+ * <p>
+ * This is an optional annotation for TextBuiltin subclasses and it carries
+ * documentation forward into the runtime system describing what the command is
+ * and why users may want to invoke it.
+ */
+@Retention(RUNTIME)
+@Target( { TYPE })
+public @interface Command {
+ /**
+ * @return name the command is invoked as from the command line. If the
+ * (default) empty string is supplied the name will be generated
+ * from the class name.
+ */
+ public String name() default "";
+
+ /**
+ * @return one line description of the command's feature set.
+ */
+ public String usage() default "";
+
+ /**
+ * @return true if this command is considered to be commonly used.
+ */
+ public boolean common() default false;
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
new file mode 100644
index 0000000..700e541
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Vector;
+
+/**
+ * List of all commands known by jgit's command line tools.
+ * <p>
+ * Commands are implementations of {@link TextBuiltin}, with an optional
+ * {@link Command} class annotation to insert additional documentation or
+ * override the default command name (which is guessed from the class name).
+ * <p>
+ * Commands may be registered by adding them to a services file in the same JAR
+ * (or classes directory) as the command implementation. The service file name
+ * is <code>META-INF/services/org.eclipse.jgit.pgm.TextBuiltin</code> and it
+ * contains one concrete implementation class name per line.
+ * <p>
+ * Command registration is identical to Java 6's services, however the catalog
+ * uses a lightweight wrapper to delay creating a command instance as much as
+ * possible. This avoids initializing the AWT or SWT GUI toolkits even if the
+ * command's constructor might require them.
+ */
+public class CommandCatalog {
+ private static final CommandCatalog INSTANCE = new CommandCatalog();
+
+ /**
+ * Locate a single command by its user friendly name.
+ *
+ * @param name
+ * name of the command. Typically in dash-lower-case-form, which
+ * was derived from the DashLowerCaseForm class name.
+ * @return the command instance; null if no command exists by that name.
+ */
+ public static CommandRef get(final String name) {
+ return INSTANCE.commands.get(name);
+ }
+
+ /**
+ * @return all known commands, sorted by command name.
+ */
+ public static CommandRef[] all() {
+ return toSortedArray(INSTANCE.commands.values());
+ }
+
+ /**
+ * @return all common commands, sorted by command name.
+ */
+ public static CommandRef[] common() {
+ final ArrayList<CommandRef> common = new ArrayList<CommandRef>();
+ for (final CommandRef c : INSTANCE.commands.values())
+ if (c.isCommon())
+ common.add(c);
+ return toSortedArray(common);
+ }
+
+ private static CommandRef[] toSortedArray(final Collection<CommandRef> c) {
+ final CommandRef[] r = c.toArray(new CommandRef[c.size()]);
+ Arrays.sort(r, new Comparator<CommandRef>() {
+ public int compare(final CommandRef o1, final CommandRef o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
+ return r;
+ }
+
+ private final ClassLoader ldr;
+
+ private final Map<String, CommandRef> commands;
+
+ private CommandCatalog() {
+ ldr = Thread.currentThread().getContextClassLoader();
+ commands = new HashMap<String, CommandRef>();
+
+ final Enumeration<URL> catalogs = catalogs();
+ while (catalogs.hasMoreElements())
+ scan(catalogs.nextElement());
+ }
+
+ private Enumeration<URL> catalogs() {
+ try {
+ final String pfx = "META-INF/services/";
+ return ldr.getResources(pfx + TextBuiltin.class.getName());
+ } catch (IOException err) {
+ return new Vector<URL>().elements();
+ }
+ }
+
+ private void scan(final URL cUrl) {
+ final BufferedReader cIn;
+ try {
+ final InputStream in = cUrl.openStream();
+ cIn = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+ } catch (IOException err) {
+ // If we cannot read from the service list, go to the next.
+ //
+ return;
+ }
+
+ try {
+ String line;
+ while ((line = cIn.readLine()) != null) {
+ if (line.length() > 0 && !line.startsWith("#"))
+ load(line);
+ }
+ } catch (IOException err) {
+ // If we failed during a read, ignore the error.
+ //
+ } finally {
+ try {
+ cIn.close();
+ } catch (IOException e) {
+ // Ignore the close error; we are only reading.
+ }
+ }
+ }
+
+ private void load(final String cn) {
+ final Class<? extends TextBuiltin> clazz;
+ try {
+ clazz = Class.forName(cn, false, ldr).asSubclass(TextBuiltin.class);
+ } catch (ClassNotFoundException notBuiltin) {
+ // Doesn't exist, even though the service entry is present.
+ //
+ return;
+ } catch (ClassCastException notBuiltin) {
+ // Isn't really a builtin, even though its listed as such.
+ //
+ return;
+ }
+
+ final CommandRef cr;
+ final Command a = clazz.getAnnotation(Command.class);
+ if (a != null)
+ cr = new CommandRef(clazz, a);
+ else
+ cr = new CommandRef(clazz);
+
+ commands.put(cr.getName(), cr);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
new file mode 100644
index 0000000..eb68ada
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * Description of a command (a {@link TextBuiltin} subclass.
+ * <p>
+ * These descriptions are lightweight compared to creating a command instance
+ * and are therefore suitable for catalogs of "known" commands without linking
+ * the command's implementation and creating a dummy instance of the command.
+ */
+public class CommandRef {
+ private final Class<? extends TextBuiltin> impl;
+
+ private final String name;
+
+ private String usage;
+
+ boolean common;
+
+ CommandRef(final Class<? extends TextBuiltin> clazz) {
+ this(clazz, guessName(clazz));
+ }
+
+ CommandRef(final Class<? extends TextBuiltin> clazz, final Command cmd) {
+ this(clazz, cmd.name().length() > 0 ? cmd.name() : guessName(clazz));
+ usage = cmd.usage();
+ common = cmd.common();
+ }
+
+ private CommandRef(final Class<? extends TextBuiltin> clazz, final String cn) {
+ impl = clazz;
+ name = cn;
+ usage = "";
+ }
+
+ private static String guessName(final Class<? extends TextBuiltin> clazz) {
+ final StringBuilder s = new StringBuilder();
+ if (clazz.getName().startsWith("org.eclipse.jgit.pgm.debug."))
+ s.append("debug-");
+
+ boolean lastWasDash = true;
+ for (final char c : clazz.getSimpleName().toCharArray()) {
+ if (Character.isUpperCase(c)) {
+ if (!lastWasDash)
+ s.append('-');
+ lastWasDash = !lastWasDash;
+ s.append(Character.toLowerCase(c));
+ } else {
+ s.append(c);
+ }
+ }
+ return s.toString();
+ }
+
+ /**
+ * @return name the command is invoked as from the command line.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return one line description of the command's feature set.
+ */
+ public String getUsage() {
+ return usage;
+ }
+
+ /**
+ * @return true if this command is considered to be commonly used.
+ */
+ public boolean isCommon() {
+ return common;
+ }
+
+ /**
+ * @return name of the Java class which implements this command.
+ */
+ public String getImplementationClassName() {
+ return impl.getName();
+ }
+
+ /**
+ * @return loader for {@link #getImplementationClassName()}.
+ */
+ public ClassLoader getImplementationClassLoader() {
+ return impl.getClassLoader();
+ }
+
+ /**
+ * @return a new instance of the command implementation.
+ */
+ public TextBuiltin create() {
+ final Constructor<? extends TextBuiltin> c;
+ try {
+ c = impl.getDeclaredConstructor();
+ } catch (SecurityException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ }
+ c.setAccessible(true);
+
+ final TextBuiltin r;
+ try {
+ r = c.newInstance();
+ } catch (InstantiationException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ } catch (IllegalArgumentException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException("Cannot create command " + getName(), e);
+ }
+ r.setCommandName(getName());
+ return r;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
new file mode 100644
index 0000000..88219bd
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.transport.DaemonService;
+
+@Command(common = true, usage = "Export repositories over git://")
+class Daemon extends TextBuiltin {
+ @Option(name = "--port", metaVar = "PORT", usage = "port number to listen on")
+ int port = org.eclipse.jgit.transport.Daemon.DEFAULT_PORT;
+
+ @Option(name = "--listen", metaVar = "HOSTNAME", usage = "hostname (or ip) to listen on")
+ String host;
+
+ @Option(name = "--timeout", metaVar = "SECONDS", usage = "abort connection if no activity")
+ int timeout = -1;
+
+ @Option(name = "--enable", metaVar = "SERVICE", usage = "enable the service in all repositories", multiValued = true)
+ final List<String> enable = new ArrayList<String>();
+
+ @Option(name = "--disable", metaVar = "SERVICE", usage = "disable the service in all repositories", multiValued = true)
+ final List<String> disable = new ArrayList<String>();
+
+ @Option(name = "--allow-override", metaVar = "SERVICE", usage = "configure the service in daemon.servicename", multiValued = true)
+ final List<String> canOverride = new ArrayList<String>();
+
+ @Option(name = "--forbid-override", metaVar = "SERVICE", usage = "configure the service in daemon.servicename", multiValued = true)
+ final List<String> forbidOverride = new ArrayList<String>();
+
+ @Option(name = "--export-all", usage = "export without git-daemon-export-ok")
+ boolean exportAll;
+
+ @Argument(required = true, metaVar = "DIRECTORY", usage = "directories to export")
+ final List<File> directory = new ArrayList<File>();
+
+ @Override
+ protected boolean requiresRepository() {
+ return false;
+ }
+
+ @Override
+ protected void run() throws Exception {
+ final org.eclipse.jgit.transport.Daemon d;
+
+ d = new org.eclipse.jgit.transport.Daemon(
+ host != null ? new InetSocketAddress(host, port)
+ : new InetSocketAddress(port));
+ d.setExportAll(exportAll);
+ if (0 <= timeout)
+ d.setTimeout(timeout);
+
+ for (final String n : enable)
+ service(d, n).setEnabled(true);
+ for (final String n : disable)
+ service(d, n).setEnabled(false);
+
+ for (final String n : canOverride)
+ service(d, n).setOverridable(true);
+ for (final String n : forbidOverride)
+ service(d, n).setOverridable(false);
+
+ for (final File f : directory) {
+ out.println("Exporting " + f.getAbsolutePath());
+ d.exportDirectory(f);
+ }
+ d.start();
+ out.println("Listening on " + d.getAddress());
+ }
+
+ private DaemonService service(final org.eclipse.jgit.transport.Daemon d,
+ final String n) {
+ final DaemonService svc = d.getService(n);
+ if (svc == null)
+ throw die("Service '" + n + "' not supported");
+ return svc;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
new file mode 100644
index 0000000..e514ca5
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+/**
+ * Indicates a {@link TextBuiltin} implementation has failed during execution.
+ * <p>
+ * Typically the stack trace for a Die exception is not shown to the user as it
+ * may indicate a simple error condition that the end-user can fix on their own,
+ * without needing a screen of Java stack frames.
+ */
+public class Die extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Construct a new message explaining what has gone wrong.
+ *
+ * @param why
+ * the message to show to the end-user.
+ */
+ public Die(final String why) {
+ super(why);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
new file mode 100644
index 0000000..13b1c78
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.pgm.opt.PathTreeFilterHandler;
+import org.eclipse.jgit.treewalk.AbstractTreeIterator;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+
+class DiffTree extends TextBuiltin {
+ @Option(name = "--recursive", usage = "recurse into subtrees", aliases = { "-r" })
+ private boolean recursive;
+
+ @Argument(index = 0, metaVar = "tree-ish", required = true)
+ void tree_0(final AbstractTreeIterator c) {
+ trees.add(c);
+ }
+
+ @Argument(index = 1, metaVar = "tree-ish", required = true)
+ private final List<AbstractTreeIterator> trees = new ArrayList<AbstractTreeIterator>();
+
+ @Option(name = "--", metaVar = "path", multiValued = true, handler = PathTreeFilterHandler.class)
+ private TreeFilter pathFilter = TreeFilter.ALL;
+
+ @Override
+ protected void run() throws Exception {
+ final TreeWalk walk = new TreeWalk(db);
+ walk.reset();
+ walk.setRecursive(recursive);
+ for (final AbstractTreeIterator i : trees)
+ walk.addTree(i);
+ walk.setFilter(AndTreeFilter.create(TreeFilter.ANY_DIFF, pathFilter));
+
+ final int nTree = walk.getTreeCount();
+ while (walk.next()) {
+ for (int i = 1; i < nTree; i++)
+ out.print(':');
+ for (int i = 0; i < nTree; i++) {
+ final FileMode m = walk.getFileMode(i);
+ final String s = m.toString();
+ for (int pad = 6 - s.length(); pad > 0; pad--)
+ out.print('0');
+ out.print(s);
+ out.print(' ');
+ }
+
+ for (int i = 0; i < nTree; i++) {
+ out.print(walk.getObjectId(i).name());
+ out.print(' ');
+ }
+
+ char chg = 'M';
+ if (nTree == 2) {
+ final int m0 = walk.getRawMode(0);
+ final int m1 = walk.getRawMode(1);
+ if (m0 == 0 && m1 != 0)
+ chg = 'A';
+ else if (m0 != 0 && m1 == 0)
+ chg = 'D';
+ else if (m0 != m1 && walk.idEqual(0, 1))
+ chg = 'T';
+ }
+ out.print(chg);
+
+ out.print('\t');
+ out.print(walk.getPathString());
+ out.println();
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
new file mode 100644
index 0000000..7315e44
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+import org.eclipse.jgit.transport.FetchResult;
+import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.transport.Transport;
+
+@Command(common = true, usage = "Update remote refs from another repository")
+class Fetch extends AbstractFetchCommand {
+ @Option(name = "--timeout", metaVar = "SECONDS", usage = "abort connection if no activity")
+ int timeout = -1;
+
+ @Option(name = "--fsck", usage = "perform fsck style checks on receive")
+ private Boolean fsck;
+
+ @Option(name = "--no-fsck")
+ void nofsck(final boolean ignored) {
+ fsck = Boolean.FALSE;
+ }
+
+ @Option(name = "--prune", usage = "prune stale tracking refs")
+ private Boolean prune;
+
+ @Option(name = "--dry-run")
+ private boolean dryRun;
+
+ @Option(name = "--thin", usage = "fetch thin pack")
+ private Boolean thin;
+
+ @Option(name = "--no-thin")
+ void nothin(final boolean ignored) {
+ thin = Boolean.FALSE;
+ }
+
+ @Argument(index = 0, metaVar = "uri-ish")
+ private String remote = "origin";
+
+ @Argument(index = 1, metaVar = "refspec")
+ private List<RefSpec> toget;
+
+ @Override
+ protected void run() throws Exception {
+ final Transport tn = Transport.open(db, remote);
+ if (fsck != null)
+ tn.setCheckFetchedObjects(fsck.booleanValue());
+ if (prune != null)
+ tn.setRemoveDeletedRefs(prune.booleanValue());
+ tn.setDryRun(dryRun);
+ if (thin != null)
+ tn.setFetchThin(thin.booleanValue());
+ if (0 <= timeout)
+ tn.setTimeout(timeout);
+ final FetchResult r;
+ try {
+ r = tn.fetch(new TextProgressMonitor(), toget);
+ if (r.getTrackingRefUpdates().isEmpty())
+ return;
+ } finally {
+ tn.close();
+ }
+ showFetchResult(tn, r);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
new file mode 100644
index 0000000..c799222
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.File;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.eclipse.jgit.awtui.CommitGraphPane;
+import org.eclipse.jgit.revplot.PlotWalk;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevSort;
+import org.eclipse.jgit.revwalk.RevWalk;
+
+class Glog extends RevWalkTextBuiltin {
+ final JFrame frame;
+
+ final CommitGraphPane graphPane;
+
+ Glog() {
+ frame = new JFrame();
+ frame.addWindowListener(new WindowAdapter() {
+ @Override
+ public void windowClosing(final WindowEvent e) {
+ frame.dispose();
+ }
+ });
+
+ graphPane = new CommitGraphPane();
+
+ final JScrollPane graphScroll = new JScrollPane(graphPane);
+
+ final JPanel buttons = new JPanel(new FlowLayout());
+ final JButton repaint = new JButton();
+ repaint.setText("Repaint");
+ repaint.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ graphPane.repaint();
+ }
+ });
+ buttons.add(repaint);
+
+ final JPanel world = new JPanel(new BorderLayout());
+ world.add(buttons, BorderLayout.SOUTH);
+ world.add(graphScroll, BorderLayout.CENTER);
+
+ frame.getContentPane().add(world);
+ }
+
+ @Override
+ protected int walkLoop() throws Exception {
+ graphPane.getCommitList().source(walk);
+ graphPane.getCommitList().fillTo(Integer.MAX_VALUE);
+
+ frame.setTitle("[" + repoName() + "]");
+ frame.pack();
+ frame.setVisible(true);
+ return graphPane.getCommitList().size();
+ }
+
+ @Override
+ protected void show(final RevCommit c) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected RevWalk createWalk() {
+ if (objects)
+ throw die("Cannot use --objects with glog");
+ final PlotWalk w = new PlotWalk(db);
+ w.sort(RevSort.BOUNDARY, true);
+ return w;
+ }
+
+ private String repoName() {
+ final File f = db.getDirectory();
+ String n = f.getName();
+ if (".git".equals(n))
+ n = f.getParentFile().getName();
+ return n;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
new file mode 100644
index 0000000..eb65e68
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+
+class IndexPack extends TextBuiltin {
+ @Option(name = "--fix-thin", usage = "fix a thin pack to be complete")
+ private boolean fixThin;
+
+ @Option(name = "--index-version", usage = "index file format to create")
+ private int indexVersion = -1;
+
+ @Argument(index = 0, required = true, metaVar = "base")
+ private File base;
+
+ @Override
+ protected void run() throws Exception {
+ if (indexVersion == -1)
+ indexVersion = db.getConfig().getCore().getPackIndexVersion();
+ final BufferedInputStream in;
+ final org.eclipse.jgit.transport.IndexPack ip;
+ in = new BufferedInputStream(System.in);
+ ip = new org.eclipse.jgit.transport.IndexPack(db, in, base);
+ ip.setFixThin(fixThin);
+ ip.setIndexVersion(indexVersion);
+ ip.index(new TextProgressMonitor());
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java
new file mode 100644
index 0000000..b6a4a44
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2009, Constantine Plotnikov <constantine.plotnikov@gmail.com>
+ * Copyright (C) 2008, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Repository;
+
+@Command(common = true, usage = "Create an empty git repository")
+class Init extends TextBuiltin {
+ @Option(name = "--bare", usage = "Create a bare repository")
+ private boolean bare;
+
+ @Override
+ protected final boolean requiresRepository() {
+ return false;
+ }
+
+ @Override
+ protected void run() throws Exception {
+ if (gitdir == null)
+ gitdir = new File(bare ? "." : ".git");
+ db = new Repository(gitdir);
+ db.create(bare);
+ out.println("Initialized empty Git repository in "
+ + gitdir.getAbsolutePath());
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
new file mode 100644
index 0000000..ecaf19b
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2006-2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.TimeZone;
+
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevWalk;
+
+@Command(common = true, usage = "View commit history")
+class Log extends RevWalkTextBuiltin {
+ private final TimeZone myTZ = TimeZone.getDefault();
+
+ private final DateFormat fmt;
+
+ private Map<AnyObjectId, Set<Ref>> allRefsByPeeledObjectId;
+
+ @Option(name="--decorate", usage="Show ref names matching commits")
+ private boolean decorate;
+
+ Log() {
+ fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US);
+ }
+
+ @Override
+ protected RevWalk createWalk() {
+ RevWalk ret = super.createWalk();
+ if (decorate)
+ allRefsByPeeledObjectId = getRepository().getAllRefsByPeeledObjectId();
+ return ret;
+ }
+
+ @Override
+ protected void show(final RevCommit c) throws Exception {
+ out.print("commit ");
+ c.getId().copyTo(outbuffer, out);
+ if (decorate) {
+ Collection<Ref> list = allRefsByPeeledObjectId.get(c.copy());
+ if (list != null) {
+ out.print(" (");
+ for (Iterator<Ref> i = list.iterator(); i.hasNext(); ) {
+ out.print(i.next().getOrigName());
+ if (i.hasNext())
+ out.print(" ");
+ }
+ out.print(")");
+ }
+ }
+ out.println();
+
+ final PersonIdent author = c.getAuthorIdent();
+ out.print("Author: ");
+ out.print(author.getName());
+ out.print(" <");
+ out.print(author.getEmailAddress());
+ out.print(">");
+ out.println();
+
+ final TimeZone authorTZ = author.getTimeZone();
+ fmt.setTimeZone(authorTZ != null ? authorTZ : myTZ);
+ out.print("Date: ");
+ out.print(fmt.format(author.getWhen()));
+ out.println();
+
+ out.println();
+ final String[] lines = c.getFullMessage().split("\n");
+ for (final String s : lines) {
+ out.print(" ");
+ out.print(s);
+ out.println();
+ }
+
+ out.println();
+ out.flush();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
new file mode 100644
index 0000000..44d1e75
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.transport.FetchConnection;
+import org.eclipse.jgit.transport.Transport;
+
+class LsRemote extends TextBuiltin {
+ @Option(name = "--timeout", metaVar = "SECONDS", usage = "abort connection if no activity")
+ int timeout = -1;
+
+ @Argument(index = 0, metaVar = "uri-ish", required = true)
+ private String remote;
+
+ @Override
+ protected void run() throws Exception {
+ final Transport tn = Transport.open(db, remote);
+ if (0 <= timeout)
+ tn.setTimeout(timeout);
+ final FetchConnection c = tn.openFetch();
+ try {
+ for (final Ref r : c.getRefs()) {
+ show(r.getObjectId(), r.getName());
+ if (r.getPeeledObjectId() != null)
+ show(r.getPeeledObjectId(), r.getName() + "^{}");
+ }
+ } finally {
+ c.close();
+ tn.close();
+ }
+ }
+
+ private void show(final AnyObjectId id, final String name) {
+ out.print(id.name());
+ out.print('\t');
+ out.print(name);
+ out.println();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
new file mode 100644
index 0000000..1a28a9a
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.treewalk.AbstractTreeIterator;
+import org.eclipse.jgit.treewalk.TreeWalk;
+
+class LsTree extends TextBuiltin {
+ @Option(name = "--recursive", usage = "recurse into subtrees", aliases = { "-r" })
+ private boolean recursive;
+
+ @Argument(index = 0, required = true, metaVar = "tree-ish")
+ private AbstractTreeIterator tree;
+
+ @Override
+ protected void run() throws Exception {
+ final TreeWalk walk = new TreeWalk(db);
+ walk.reset(); // drop the first empty tree, which we do not need here
+ walk.setRecursive(recursive);
+ walk.addTree(tree);
+
+ while (walk.next()) {
+ final FileMode mode = walk.getFileMode(0);
+ if (mode == FileMode.TREE)
+ out.print('0');
+ out.print(mode);
+ out.print(' ');
+ out.print(Constants.typeString(mode.getObjectType()));
+
+ out.print(' ');
+ out.print(walk.getObjectId(0).name());
+
+ out.print('\t');
+ out.print(walk.getPathString());
+ out.println();
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
new file mode 100644
index 0000000..625132a
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com>
+ * Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.ExampleMode;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.awtui.AwtAuthenticator;
+import org.eclipse.jgit.errors.TransportException;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.pgm.opt.CmdLineParser;
+import org.eclipse.jgit.pgm.opt.SubcommandHandler;
+import org.eclipse.jgit.util.HttpSupport;
+
+/** Command line entry point. */
+public class Main {
+ @Option(name = "--help", usage = "display this help text", aliases = { "-h" })
+ private boolean help;
+
+ @Option(name = "--show-stack-trace", usage = "display the Java stack trace on exceptions")
+ private boolean showStackTrace;
+
+ @Option(name = "--git-dir", metaVar = "GIT_DIR", usage = "set the git repository to operate on")
+ private File gitdir;
+
+ @Argument(index = 0, metaVar = "command", required = true, handler = SubcommandHandler.class)
+ private TextBuiltin subcommand;
+
+ @Argument(index = 1, metaVar = "ARG")
+ private List<String> arguments = new ArrayList<String>();
+
+ /**
+ * Execute the command line.
+ *
+ * @param argv
+ * arguments.
+ */
+ public static void main(final String[] argv) {
+ final Main me = new Main();
+ try {
+ AwtAuthenticator.install();
+ HttpSupport.configureHttpProxy();
+ me.execute(argv);
+ } catch (Die err) {
+ System.err.println("fatal: " + err.getMessage());
+ if (me.showStackTrace)
+ err.printStackTrace();
+ System.exit(128);
+ } catch (Exception err) {
+ if (!me.showStackTrace && err.getCause() != null
+ && err instanceof TransportException)
+ System.err.println("fatal: " + err.getCause().getMessage());
+
+ if (err.getClass().getName().startsWith("org.eclipse.jgit.errors.")) {
+ System.err.println("fatal: " + err.getMessage());
+ if (me.showStackTrace)
+ err.printStackTrace();
+ System.exit(128);
+ }
+ err.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private void execute(final String[] argv) throws Exception {
+ final CmdLineParser clp = new CmdLineParser(this);
+ try {
+ clp.parseArgument(argv);
+ } catch (CmdLineException err) {
+ if (argv.length > 0 && !help) {
+ System.err.println("fatal: " + err.getMessage());
+ System.exit(1);
+ }
+ }
+
+ if (argv.length == 0 || help) {
+ final String ex = clp.printExample(ExampleMode.ALL);
+ System.err.println("jgit" + ex + " command [ARG ...]");
+ if (help) {
+ System.err.println();
+ clp.printUsage(System.err);
+ System.err.println();
+ } else if (subcommand == null) {
+ System.err.println();
+ System.err.println("The most commonly used commands are:");
+ final CommandRef[] common = CommandCatalog.common();
+ int width = 0;
+ for (final CommandRef c : common)
+ width = Math.max(width, c.getName().length());
+ width += 2;
+
+ for (final CommandRef c : common) {
+ System.err.print(' ');
+ System.err.print(c.getName());
+ for (int i = c.getName().length(); i < width; i++)
+ System.err.print(' ');
+ System.err.print(c.getUsage());
+ System.err.println();
+ }
+ System.err.println();
+ }
+ System.exit(1);
+ }
+
+ final TextBuiltin cmd = subcommand;
+ if (cmd.requiresRepository()) {
+ if (gitdir == null)
+ gitdir = findGitDir();
+ if (gitdir == null || !gitdir.isDirectory()) {
+ System.err.println("error: can't find git directory");
+ System.exit(1);
+ }
+ cmd.init(new Repository(gitdir), gitdir);
+ } else {
+ cmd.init(null, gitdir);
+ }
+ try {
+ cmd.execute(arguments.toArray(new String[arguments.size()]));
+ } finally {
+ if (cmd.out != null)
+ cmd.out.flush();
+ }
+ }
+
+ private static File findGitDir() {
+ File current = new File(".").getAbsoluteFile();
+ while (current != null) {
+ final File gitDir = new File(current, ".git");
+ if (gitDir.isDirectory())
+ return gitDir;
+ current = current.getParentFile();
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
new file mode 100644
index 0000000..91fd744
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.filter.RevFilter;
+
+class MergeBase extends TextBuiltin {
+ @Option(name = "--all", usage = "display all possible merge bases")
+ private boolean all;
+
+ @Argument(index = 0, metaVar = "commit-ish", required = true)
+ void commit_0(final RevCommit c) {
+ commits.add(c);
+ }
+
+ @Argument(index = 1, metaVar = "commit-ish", required = true)
+ private final List<RevCommit> commits = new ArrayList<RevCommit>();
+
+ @Override
+ protected void run() throws Exception {
+ for (final RevCommit c : commits)
+ argWalk.markStart(c);
+ argWalk.setRevFilter(RevFilter.MERGE_BASE);
+ int max = all ? Integer.MAX_VALUE : 1;
+ while (max-- > 0) {
+ final RevCommit b = argWalk.next();
+ if (b == null)
+ break;
+ out.println(b.getId().name());
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
new file mode 100644
index 0000000..8afa522
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+import org.eclipse.jgit.transport.PushResult;
+import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.transport.RemoteRefUpdate;
+import org.eclipse.jgit.transport.Transport;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.transport.RemoteRefUpdate.Status;
+
+@Command(common = true, usage = "Update remote repository from local refs")
+class Push extends TextBuiltin {
+ @Option(name = "--timeout", metaVar = "SECONDS", usage = "abort connection if no activity")
+ int timeout = -1;
+
+ @Argument(index = 0, metaVar = "uri-ish")
+ private String remote = "origin";
+
+ @Argument(index = 1, metaVar = "refspec")
+ private final List<RefSpec> refSpecs = new ArrayList<RefSpec>();
+
+ @Option(name = "--all")
+ void addAll(final boolean ignored) {
+ refSpecs.add(Transport.REFSPEC_PUSH_ALL);
+ }
+
+ @Option(name = "--tags")
+ void addTags(final boolean ignored) {
+ refSpecs.add(Transport.REFSPEC_TAGS);
+ }
+
+ @Option(name = "--verbose", aliases = { "-v" })
+ private boolean verbose = false;
+
+ @Option(name = "--thin")
+ private boolean thin = Transport.DEFAULT_PUSH_THIN;
+
+ @Option(name = "--no-thin")
+ void nothin(final boolean ignored) {
+ thin = false;
+ }
+
+ @Option(name = "--force", aliases = { "-f" })
+ private boolean force;
+
+ @Option(name = "--receive-pack", metaVar = "path")
+ private String receivePack;
+
+ @Option(name = "--dry-run")
+ private boolean dryRun;
+
+ private boolean shownURI;
+
+ @Override
+ protected void run() throws Exception {
+ if (force) {
+ final List<RefSpec> orig = new ArrayList<RefSpec>(refSpecs);
+ refSpecs.clear();
+ for (final RefSpec spec : orig)
+ refSpecs.add(spec.setForceUpdate(true));
+ }
+
+ final List<Transport> transports;
+ transports = Transport.openAll(db, remote, Transport.Operation.PUSH);
+ for (final Transport transport : transports) {
+ if (0 <= timeout)
+ transport.setTimeout(timeout);
+ transport.setPushThin(thin);
+ if (receivePack != null)
+ transport.setOptionReceivePack(receivePack);
+ transport.setDryRun(dryRun);
+
+ final Collection<RemoteRefUpdate> toPush = transport
+ .findRemoteRefUpdatesFor(refSpecs);
+
+ final URIish uri = transport.getURI();
+ final PushResult result;
+ try {
+ result = transport.push(new TextProgressMonitor(), toPush);
+ } finally {
+ transport.close();
+ }
+ printPushResult(uri, result);
+ }
+ }
+
+ private void printPushResult(final URIish uri,
+ final PushResult result) {
+ shownURI = false;
+ boolean everythingUpToDate = true;
+
+ // at first, print up-to-date ones...
+ for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+ if (rru.getStatus() == Status.UP_TO_DATE) {
+ if (verbose)
+ printRefUpdateResult(uri, result, rru);
+ } else
+ everythingUpToDate = false;
+ }
+
+ for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+ // ...then successful updates...
+ if (rru.getStatus() == Status.OK)
+ printRefUpdateResult(uri, result, rru);
+ }
+
+ for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+ // ...finally, others (problematic)
+ if (rru.getStatus() != Status.OK
+ && rru.getStatus() != Status.UP_TO_DATE)
+ printRefUpdateResult(uri, result, rru);
+ }
+
+ if (everythingUpToDate)
+ out.println("Everything up-to-date");
+ }
+
+ private void printRefUpdateResult(final URIish uri,
+ final PushResult result, final RemoteRefUpdate rru) {
+ if (!shownURI) {
+ shownURI = true;
+ out.format("To %s\n", uri);
+ }
+
+ final String remoteName = rru.getRemoteName();
+ final String srcRef = rru.isDelete() ? null : rru.getSrcRef();
+
+ switch (rru.getStatus()) {
+ case OK:
+ if (rru.isDelete())
+ printUpdateLine('-', "[deleted]", null, remoteName, null);
+ else {
+ final Ref oldRef = result.getAdvertisedRef(remoteName);
+ if (oldRef == null) {
+ final String summary;
+ if (remoteName.startsWith(Constants.R_TAGS))
+ summary = "[new tag]";
+ else
+ summary = "[new branch]";
+ printUpdateLine('*', summary, srcRef, remoteName, null);
+ } else {
+ boolean fastForward = rru.isFastForward();
+ final char flag = fastForward ? ' ' : '+';
+ final String summary = oldRef.getObjectId().abbreviate(db)
+ .name()
+ + (fastForward ? ".." : "...")
+ + rru.getNewObjectId().abbreviate(db).name();
+ final String message = fastForward ? null : "forced update";
+ printUpdateLine(flag, summary, srcRef, remoteName, message);
+ }
+ }
+ break;
+
+ case NON_EXISTING:
+ printUpdateLine('X', "[no match]", null, remoteName, null);
+ break;
+
+ case REJECTED_NODELETE:
+ printUpdateLine('!', "[rejected]", null, remoteName,
+ "remote side does not support deleting refs");
+ break;
+
+ case REJECTED_NONFASTFORWARD:
+ printUpdateLine('!', "[rejected]", srcRef, remoteName,
+ "non-fast forward");
+ break;
+
+ case REJECTED_REMOTE_CHANGED:
+ final String message = "remote ref object changed - is not expected one "
+ + rru.getExpectedOldObjectId().abbreviate(db).name();
+ printUpdateLine('!', "[rejected]", srcRef, remoteName, message);
+ break;
+
+ case REJECTED_OTHER_REASON:
+ printUpdateLine('!', "[remote rejected]", srcRef, remoteName, rru
+ .getMessage());
+ break;
+
+ case UP_TO_DATE:
+ if (verbose)
+ printUpdateLine('=', "[up to date]", srcRef, remoteName, null);
+ break;
+
+ case NOT_ATTEMPTED:
+ case AWAITING_REPORT:
+ printUpdateLine('?', "[unexpected push-process behavior]", srcRef,
+ remoteName, rru.getMessage());
+ break;
+ }
+ }
+
+ private void printUpdateLine(final char flag, final String summary,
+ final String srcRef, final String destRef, final String message) {
+ out.format(" %c %-17s", flag, summary);
+
+ if (srcRef != null)
+ out.format(" %s ->", abbreviateRef(srcRef, true));
+ out.format(" %s", abbreviateRef(destRef, true));
+
+ if (message != null)
+ out.format(" (%s)", message);
+
+ out.println();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
new file mode 100644
index 0000000..c6a6fd0
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+
+import org.kohsuke.args4j.Argument;
+import org.eclipse.jgit.lib.Repository;
+
+@Command(common = false, usage = "Server side backend for 'jgit push'")
+class ReceivePack extends TextBuiltin {
+ @Argument(index = 0, required = true, metaVar = "DIRECTORY", usage = "Repository to receive into")
+ File dstGitdir;
+
+ @Override
+ protected final boolean requiresRepository() {
+ return false;
+ }
+
+ @Override
+ protected void run() throws Exception {
+ final org.eclipse.jgit.transport.ReceivePack rp;
+
+ if (new File(dstGitdir, ".git").isDirectory())
+ dstGitdir = new File(dstGitdir, ".git");
+ db = new Repository(dstGitdir);
+ if (!db.getObjectsDirectory().isDirectory())
+ throw die("'" + dstGitdir.getPath() + "' not a git repository");
+ rp = new org.eclipse.jgit.transport.ReceivePack(db);
+ rp.receive(System.in, System.out, System.err);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
new file mode 100644
index 0000000..1b8c180
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import org.eclipse.jgit.revwalk.ObjectWalk;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevFlag;
+import org.eclipse.jgit.revwalk.RevObject;
+import org.eclipse.jgit.revwalk.RevTree;
+
+class RevList extends RevWalkTextBuiltin {
+ @Override
+ protected void show(final RevCommit c) throws Exception {
+ if (c.has(RevFlag.UNINTERESTING))
+ out.print('-');
+ c.getId().copyTo(outbuffer, out);
+ if (parents)
+ for (int i = 0; i < c.getParentCount(); i++) {
+ out.print(' ');
+ c.getParent(i).getId().copyTo(outbuffer, out);
+ }
+ out.println();
+ }
+
+ @Override
+ protected void show(final ObjectWalk ow, final RevObject obj)
+ throws Exception {
+ if (obj.has(RevFlag.UNINTERESTING))
+ out.print('-');
+ obj.getId().copyTo(outbuffer, out);
+ final String path = ow.getPathString();
+ if (path != null) {
+ out.print(' ');
+ out.print(path);
+ } else if (obj instanceof RevTree)
+ out.print(' ');
+ out.println();
+
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
new file mode 100644
index 0000000..98eb2ce
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2009, Daniel Cheng (aka SDiZ) <git@sdiz.net>
+ * Copyright (C) 2009, Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Ref;
+
+class RevParse extends TextBuiltin {
+ @Option(name = "--all")
+ boolean all = false;
+
+ @Argument(index = 0, metaVar = "commit-ish")
+ private final List<ObjectId> commits = new ArrayList<ObjectId>();
+
+ @Override
+ protected void run() throws Exception {
+ if (all) {
+ Map<String, Ref> allRefs = db.getAllRefs();
+ for (final Ref r : allRefs.values())
+ out.println(r.getObjectId().name());
+ } else {
+ for (final ObjectId o : commits)
+ out.println(o.name());
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
new file mode 100644
index 0000000..cb0cd6d
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.pgm.opt.PathTreeFilterHandler;
+import org.eclipse.jgit.revwalk.ObjectWalk;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevFlag;
+import org.eclipse.jgit.revwalk.RevObject;
+import org.eclipse.jgit.revwalk.RevSort;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.revwalk.filter.AndRevFilter;
+import org.eclipse.jgit.revwalk.filter.AuthorRevFilter;
+import org.eclipse.jgit.revwalk.filter.CommitterRevFilter;
+import org.eclipse.jgit.revwalk.filter.MessageRevFilter;
+import org.eclipse.jgit.revwalk.filter.RevFilter;
+import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+
+abstract class RevWalkTextBuiltin extends TextBuiltin {
+ RevWalk walk;
+
+ @Option(name = "--objects")
+ boolean objects = false;
+
+ @Option(name = "--parents")
+ boolean parents = false;
+
+ @Option(name = "--total-count")
+ boolean count = false;
+
+ char[] outbuffer = new char[Constants.OBJECT_ID_LENGTH * 2];
+
+ private final EnumSet<RevSort> sorting = EnumSet.noneOf(RevSort.class);
+
+ private void enableRevSort(final RevSort type, final boolean on) {
+ if (on)
+ sorting.add(type);
+ else
+ sorting.remove(type);
+ }
+
+ @Option(name = "--date-order")
+ void enableDateOrder(final boolean on) {
+ enableRevSort(RevSort.COMMIT_TIME_DESC, on);
+ }
+
+ @Option(name = "--topo-order")
+ void enableTopoOrder(final boolean on) {
+ enableRevSort(RevSort.TOPO, on);
+ }
+
+ @Option(name = "--reverse")
+ void enableReverse(final boolean on) {
+ enableRevSort(RevSort.REVERSE, on);
+ }
+
+ @Option(name = "--boundary")
+ void enableBoundary(final boolean on) {
+ enableRevSort(RevSort.BOUNDARY, on);
+ }
+
+ @Argument(index = 0, metaVar = "commit-ish")
+ private final List<RevCommit> commits = new ArrayList<RevCommit>();
+
+ @Option(name = "--", metaVar = "path", multiValued = true, handler = PathTreeFilterHandler.class)
+ private TreeFilter pathFilter = TreeFilter.ALL;
+
+ private final List<RevFilter> revLimiter = new ArrayList<RevFilter>();
+
+ @Option(name = "--author")
+ void addAuthorRevFilter(final String who) {
+ revLimiter.add(AuthorRevFilter.create(who));
+ }
+
+ @Option(name = "--committer")
+ void addCommitterRevFilter(final String who) {
+ revLimiter.add(CommitterRevFilter.create(who));
+ }
+
+ @Option(name = "--grep")
+ void addCMessageRevFilter(final String msg) {
+ revLimiter.add(MessageRevFilter.create(msg));
+ }
+
+ @Override
+ protected void run() throws Exception {
+ walk = createWalk();
+ for (final RevSort s : sorting)
+ walk.sort(s, true);
+
+ if (pathFilter != TreeFilter.ALL)
+ walk.setTreeFilter(AndTreeFilter.create(pathFilter,
+ TreeFilter.ANY_DIFF));
+
+ if (revLimiter.size() == 1)
+ walk.setRevFilter(revLimiter.get(0));
+ else if (revLimiter.size() > 1)
+ walk.setRevFilter(AndRevFilter.create(revLimiter));
+
+ if (commits.isEmpty()) {
+ final ObjectId head = db.resolve(Constants.HEAD);
+ if (head == null)
+ throw die("Cannot resolve " + Constants.HEAD);
+ commits.add(walk.parseCommit(head));
+ }
+ for (final RevCommit c : commits) {
+ final RevCommit real = argWalk == walk ? c : walk.parseCommit(c);
+ if (c.has(RevFlag.UNINTERESTING))
+ walk.markUninteresting(real);
+ else
+ walk.markStart(real);
+ }
+
+ final long start = System.currentTimeMillis();
+ final int n = walkLoop();
+ if (count) {
+ final long end = System.currentTimeMillis();
+ System.err.print(n);
+ System.err.print(' ');
+ System.err.print(end - start);
+ System.err.print(" ms");
+ System.err.println();
+ }
+ }
+
+ protected RevWalk createWalk() {
+ if (objects)
+ return new ObjectWalk(db);
+ if (argWalk == null)
+ argWalk = new RevWalk(db);
+ return argWalk;
+ }
+
+ protected int walkLoop() throws Exception {
+ int n = 0;
+ for (final RevCommit c : walk) {
+ n++;
+ show(c);
+ }
+ if (walk instanceof ObjectWalk) {
+ final ObjectWalk ow = (ObjectWalk) walk;
+ for (;;) {
+ final RevObject obj = ow.nextObject();
+ if (obj == null)
+ break;
+ show(ow, obj);
+ }
+ }
+ return n;
+ }
+
+ protected abstract void show(final RevCommit c) throws Exception;
+
+ protected void show(final ObjectWalk objectWalk,
+ final RevObject currentObject) throws Exception {
+ // Do nothing by default. Most applications cannot show an object.
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java
new file mode 100644
index 0000000..63e6e17
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.kohsuke.args4j.spi.StopOptionHandler;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheBuildIterator;
+import org.eclipse.jgit.dircache.DirCacheBuilder;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.pgm.opt.PathTreeFilterHandler;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+
+@Command(usage = "Stop tracking a file", common = true)
+class Rm extends TextBuiltin {
+ @Argument(metaVar = "path", usage = "path", multiValued = true, required = true, handler = PathTreeFilterHandler.class)
+ @Option(name = "--", handler = StopOptionHandler.class)
+ private TreeFilter paths;
+
+ private File root;
+
+ @Override
+ protected void run() throws Exception {
+ root = db.getWorkDir();
+
+ final DirCache dirc = DirCache.lock(db);
+ final DirCacheBuilder edit = dirc.builder();
+
+ final TreeWalk walk = new TreeWalk(db);
+ walk.reset(); // drop the first empty tree, which we do not need here
+ walk.setRecursive(true);
+ walk.setFilter(paths);
+ walk.addTree(new DirCacheBuildIterator(edit));
+
+ while (walk.next()) {
+ final File path = new File(root, walk.getPathString());
+ final FileMode mode = walk.getFileMode(0);
+ if (mode.getObjectType() == Constants.OBJ_BLOB) {
+ // Deleting a blob is simply a matter of removing
+ // the file or symlink named by the tree entry.
+ delete(path);
+ }
+ }
+
+ edit.commit();
+ }
+
+ private void delete(File p) {
+ while (p != null && !p.equals(root) && p.delete())
+ p = p.getParentFile();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
new file mode 100644
index 0000000..7dbb21c
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.util.TreeMap;
+
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.Ref;
+
+class ShowRef extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ for (final Ref r : new TreeMap<String, Ref>(db.getAllRefs()).values()) {
+ show(r.getObjectId(), r.getName());
+ if (r.getPeeledObjectId() != null)
+ show(r.getPeeledObjectId(), r.getName() + "^{}");
+ }
+ }
+
+ private void show(final AnyObjectId id, final String name) {
+ out.print(id.name());
+ out.print('\t');
+ out.print(name);
+ out.println();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
new file mode 100644
index 0000000..703b10b
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2008, Charles O'Farrell <charleso@charleso.org>
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg.lists@dewire.com>
+ * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.PersonIdent;
+
+@Command(common = true, usage = "Create a tag")
+class Tag extends TextBuiltin {
+ @Option(name = "-f", usage = "force replacing an existing tag")
+ private boolean force;
+
+ @Option(name = "-m", metaVar = "message", usage = "tag message")
+ private String message = "";
+
+ @Argument(index = 0, required = true, metaVar = "name")
+ private String tagName;
+
+ @Argument(index = 1, metaVar = "object")
+ private ObjectId object;
+
+ @Override
+ protected void run() throws Exception {
+ if (object == null) {
+ object = db.resolve(Constants.HEAD);
+ if (object == null)
+ throw die("Cannot resolve " + Constants.HEAD);
+ }
+
+ if (!tagName.startsWith(Constants.R_TAGS))
+ tagName = Constants.R_TAGS + tagName;
+ if (!force && db.resolve(tagName) != null) {
+ throw die("fatal: tag '"
+ + tagName.substring(Constants.R_TAGS.length())
+ + "' exists");
+ }
+
+ final ObjectLoader ldr = db.openObject(object);
+ if (ldr == null)
+ throw new MissingObjectException(object, "any");
+
+ org.eclipse.jgit.lib.Tag tag = new org.eclipse.jgit.lib.Tag(db);
+ tag.setObjId(object);
+ tag.setType(Constants.typeString(ldr.getType()));
+ tag.setTagger(new PersonIdent(db));
+ tag.setMessage(message.replaceAll("\r", ""));
+ tag.setTag(tagName.substring(Constants.R_TAGS.length()));
+ tag.tag();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
new file mode 100644
index 0000000..edd4fbc
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import static org.eclipse.jgit.lib.Constants.R_HEADS;
+import static org.eclipse.jgit.lib.Constants.R_REMOTES;
+import static org.eclipse.jgit.lib.Constants.R_TAGS;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.pgm.opt.CmdLineParser;
+import org.eclipse.jgit.revwalk.RevWalk;
+
+/**
+ * Abstract command which can be invoked from the command line.
+ * <p>
+ * Commands are configured with a single "current" repository and then the
+ * {@link #execute(String[])} method is invoked with the arguments that appear
+ * on the command line after the command name.
+ * <p>
+ * Command constructors should perform as little work as possible as they may be
+ * invoked very early during process loading, and the command may not execute
+ * even though it was constructed.
+ */
+public abstract class TextBuiltin {
+ private String commandName;
+
+ @Option(name = "--help", usage = "display this help text", aliases = { "-h" })
+ private boolean help;
+
+ /** Stream to output to, typically this is standard output. */
+ protected PrintWriter out;
+
+ /** Git repository the command was invoked within. */
+ protected Repository db;
+
+ /** Directory supplied via --git-dir command line option. */
+ protected File gitdir;
+
+ /** RevWalk used during command line parsing, if it was required. */
+ protected RevWalk argWalk;
+
+ final void setCommandName(final String name) {
+ commandName = name;
+ }
+
+ /** @return true if {@link #db}/{@link #getRepository()} is required. */
+ protected boolean requiresRepository() {
+ return true;
+ }
+
+ void init(final Repository repo, final File gd) {
+ try {
+ final String outputEncoding = repo != null ? repo.getConfig()
+ .getString("i18n", null, "logOutputEncoding") : null;
+ if (outputEncoding != null)
+ out = new PrintWriter(new BufferedWriter(
+ new OutputStreamWriter(System.out, outputEncoding)));
+ else
+ out = new PrintWriter(new BufferedWriter(
+ new OutputStreamWriter(System.out)));
+ } catch (IOException e) {
+ throw die("cannot create output stream");
+ }
+
+ if (repo != null) {
+ db = repo;
+ gitdir = repo.getDirectory();
+ } else {
+ db = null;
+ gitdir = gd;
+ }
+ }
+
+ /**
+ * Parse arguments and run this command.
+ *
+ * @param args
+ * command line arguments passed after the command name.
+ * @throws Exception
+ * an error occurred while processing the command. The main
+ * framework will catch the exception and print a message on
+ * standard error.
+ */
+ public final void execute(String[] args) throws Exception {
+ parseArguments(args);
+ run();
+ }
+
+ /**
+ * Parses the command line arguments prior to running.
+ * <p>
+ * This method should only be invoked by {@link #execute(String[])}, prior
+ * to calling {@link #run()}. The default implementation parses all
+ * arguments into this object's instance fields.
+ *
+ * @param args
+ * the arguments supplied on the command line, if any.
+ */
+ protected void parseArguments(final String[] args) {
+ final CmdLineParser clp = new CmdLineParser(this);
+ try {
+ clp.parseArgument(args);
+ } catch (CmdLineException err) {
+ if (!help) {
+ System.err.println("fatal: " + err.getMessage());
+ System.exit(1);
+ }
+ }
+
+ if (help) {
+ printUsageAndExit(clp);
+ }
+
+ argWalk = clp.getRevWalkGently();
+ }
+
+ /**
+ * Print the usage line
+ *
+ * @param clp
+ */
+ public void printUsageAndExit(final CmdLineParser clp) {
+ printUsageAndExit("", clp);
+ }
+
+ /**
+ * Print an error message and the usage line
+ *
+ * @param message
+ * @param clp
+ */
+ public void printUsageAndExit(final String message, final CmdLineParser clp) {
+ System.err.println(message);
+ System.err.print("jgit ");
+ System.err.print(commandName);
+ clp.printSingleLineUsage(System.err);
+ System.err.println();
+
+ System.err.println();
+ clp.printUsage(System.err);
+ System.err.println();
+
+ System.exit(1);
+ }
+
+ /**
+ * Perform the actions of this command.
+ * <p>
+ * This method should only be invoked by {@link #execute(String[])}.
+ *
+ * @throws Exception
+ * an error occurred while processing the command. The main
+ * framework will catch the exception and print a message on
+ * standard error.
+ */
+ protected abstract void run() throws Exception;
+
+ /**
+ * @return the repository this command accesses.
+ */
+ public Repository getRepository() {
+ return db;
+ }
+
+ ObjectId resolve(final String s) throws IOException {
+ final ObjectId r = db.resolve(s);
+ if (r == null)
+ throw die("Not a revision: " + s);
+ return r;
+ }
+
+ /**
+ * @param why
+ * textual explanation
+ * @return a runtime exception the caller is expected to throw
+ */
+ protected static Die die(final String why) {
+ return new Die(why);
+ }
+
+ String abbreviateRef(String dst, boolean abbreviateRemote) {
+ if (dst.startsWith(R_HEADS))
+ dst = dst.substring(R_HEADS.length());
+ else if (dst.startsWith(R_TAGS))
+ dst = dst.substring(R_TAGS.length());
+ else if (abbreviateRemote && dst.startsWith(R_REMOTES))
+ dst = dst.substring(R_REMOTES.length());
+ return dst;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
new file mode 100644
index 0000000..85dbbc5
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+import java.io.File;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.Repository;
+
+@Command(common = false, usage = "Server side backend for 'jgit fetch'")
+class UploadPack extends TextBuiltin {
+ @Option(name = "--timeout", metaVar = "SECONDS", usage = "abort connection if no activity")
+ int timeout = -1;
+
+ @Argument(index = 0, required = true, metaVar = "DIRECTORY", usage = "Repository to read from")
+ File srcGitdir;
+
+ @Override
+ protected final boolean requiresRepository() {
+ return false;
+ }
+
+ @Override
+ protected void run() throws Exception {
+ final org.eclipse.jgit.transport.UploadPack rp;
+
+ if (new File(srcGitdir, ".git").isDirectory())
+ srcGitdir = new File(srcGitdir, ".git");
+ db = new Repository(srcGitdir);
+ if (!db.getObjectsDirectory().isDirectory())
+ throw die("'" + srcGitdir.getPath() + "' not a git repository");
+ rp = new org.eclipse.jgit.transport.UploadPack(db);
+ if (0 <= timeout)
+ rp.setTimeout(timeout);
+ rp.upload(System.in, System.out, System.err);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
new file mode 100644
index 0000000..11b6e83
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm;
+
+@Command(common = true, usage = "Display the version of jgit")
+class Version extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final Package pkg = getClass().getPackage();
+ if (pkg == null || pkg.getImplementationVersion() == null)
+ throw die("Cannot read package information.");
+
+ out.print("jgit version ");
+ out.print(pkg.getImplementationVersion());
+ out.println();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/build/JarLinkUtil.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/build/JarLinkUtil.java
new file mode 100644
index 0000000..e63f39c
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/build/JarLinkUtil.java
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.build;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import java.util.zip.ZipOutputStream;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.Option;
+import org.kohsuke.args4j.spi.MapOptionHandler;
+
+/**
+ * Combines multiple JAR and directory sources into a single JAR file.
+ * <p>
+ * This is a crude command line utility to combine multiple JAR files into a
+ * single JAR file, without first needing to unpack the individual JARs.
+ * <p>
+ * The output ZIP stream is sent to standard out and can be redirected onto the
+ * end of a shell script which starts the JRE.
+ */
+public class JarLinkUtil {
+ /**
+ * Combine multiple JARs.
+ *
+ * @param argv
+ * the command line arguments indicating the files to pack.
+ * @throws IOException
+ * a source file could not be read.
+ */
+ public static void main(final String[] argv) throws IOException {
+ final JarLinkUtil util = new JarLinkUtil();
+ final CmdLineParser clp = new CmdLineParser(util);
+ try {
+ clp.parseArgument(argv);
+ } catch (CmdLineException e) {
+ clp.printSingleLineUsage(System.err);
+ System.exit(1);
+ }
+ util.run();
+ }
+
+ @Option(name = "-include", required = true)
+ private List<File> includes = new ArrayList<File>();
+
+ @Option(name = "-file", handler = MapOptionHandler.class)
+ private Map<String, String> files = new HashMap<String, String>();
+
+ private final Map<String, File> chosenSources = new HashMap<String, File>();
+
+ private long creationTime;
+
+ private ZipOutputStream zos;
+
+ private JarLinkUtil() {
+ // Command line utility only.
+ }
+
+ private void run() throws IOException {
+ for (final File src : includes) {
+ if (src.isFile())
+ scanJar(src);
+ else
+ scanDirectory(src, src, "");
+ }
+ for (final Map.Entry<String, String> e : files.entrySet())
+ chosenSources.put(e.getKey(), new File(e.getValue()));
+
+ creationTime = System.currentTimeMillis();
+ zos = new ZipOutputStream(System.out);
+ zos.setLevel(9);
+
+ for (final File src : includes) {
+ if (src.isFile())
+ appendJar(src);
+ else
+ appendDirectory(src, src, "");
+ }
+ for (final String name : files.keySet())
+ appendFile(chosenSources.get(name), name);
+
+ zos.close();
+ }
+
+ private void scanJar(final File jarPath) throws IOException {
+ final ZipFile zf = new ZipFile(jarPath);
+ final Enumeration<? extends ZipEntry> e = zf.entries();
+ while (e.hasMoreElements())
+ chosenSources.put(e.nextElement().getName(), jarPath);
+ zf.close();
+ }
+
+ private void scanDirectory(final File rootPath, final File dirPath,
+ final String pfx) throws IOException {
+ final File[] entries = dirPath.listFiles();
+ if (entries == null)
+ return;
+ for (final File e : entries) {
+ if (e.getName().equals(".") || e.getName().equals(".."))
+ continue;
+
+ if (e.isDirectory())
+ scanDirectory(rootPath, e, pfx + e.getName() + "/");
+ else
+ chosenSources.put(pfx + e.getName(), rootPath);
+ }
+ }
+
+ private void appendJar(final File jarPath) throws IOException {
+ final ZipFile zf = new ZipFile(jarPath);
+ final Enumeration<? extends ZipEntry> e = zf.entries();
+ while (e.hasMoreElements()) {
+ final ZipEntry ze = e.nextElement();
+ final String name = ze.getName();
+ if (chosenSources.get(name) == jarPath)
+ appendEntry(name, ze.getSize(), ze.getTime(), zf
+ .getInputStream(ze));
+ }
+ zf.close();
+ }
+
+ private void appendDirectory(final File rootDir, final File dirPath,
+ final String pfx) throws IOException {
+ final File[] entries = dirPath.listFiles();
+ if (entries == null)
+ return;
+ for (final File e : entries) {
+ if (e.getName().equals(".") || e.getName().equals(".."))
+ continue;
+
+ if (e.isDirectory())
+ appendDirectory(rootDir, e, pfx + e.getName() + "/");
+ else if (chosenSources.get(pfx + e.getName()) == rootDir)
+ appendFile(e, pfx + e.getName());
+ }
+ }
+
+ private void appendFile(final File path, final String name)
+ throws IOException {
+ final long len = path.length();
+ final InputStream is = new FileInputStream(path);
+ appendEntry(name, len, creationTime, is);
+ }
+
+ private void appendEntry(final String name, final long len,
+ final long time, final InputStream is) throws IOException {
+ final ZipEntry ze = new ZipEntry(name);
+ ze.setSize(len);
+ ze.setTime(time);
+ zos.putNextEntry(ze);
+ try {
+ final byte[] buf = new byte[4096];
+ int n;
+ while ((n = is.read(buf)) >= 0)
+ zos.write(buf, 0, n);
+ } finally {
+ is.close();
+ }
+ zos.closeEntry();
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
new file mode 100644
index 0000000..8949cbc
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheTree;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+class MakeCacheTree extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final DirCache cache = DirCache.read(db);
+ final DirCacheTree tree = cache.getCacheTree(true);
+ show(tree);
+ }
+
+ private void show(final DirCacheTree tree) {
+ out.print("\"");
+ out.print(tree.getPathString());
+ out.print("\"");
+ out.print(": ");
+ out.print(tree.getEntrySpan());
+ out.print(" entries");
+ out.print(", ");
+ out.print(tree.getChildCount());
+ out.print(" children");
+ out.println();
+
+ for (int i = 0; i < tree.getChildCount(); i++)
+ show(tree.getChild(i));
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
new file mode 100644
index 0000000..b0c1c77
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+class ReadDirCache extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final int cnt = 100;
+ final long start = System.currentTimeMillis();
+ for (int i = 0; i < cnt; i++)
+ DirCache.read(db);
+ final long end = System.currentTimeMillis();
+ out.println(" average " + ((end - start) / cnt) + " ms/read");
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
new file mode 100644
index 0000000..50b8898
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.errors.ObjectWritingException;
+import org.eclipse.jgit.lib.Commit;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.LockFile;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectWriter;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.lib.ProgressMonitor;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.lib.RefWriter;
+import org.eclipse.jgit.lib.TextProgressMonitor;
+import org.eclipse.jgit.lib.Tree;
+import org.eclipse.jgit.pgm.TextBuiltin;
+import org.eclipse.jgit.revwalk.RevWalk;
+
+/**
+ * Recreates a repository from another one's commit graph.
+ * <p>
+ * <b>Do not run this on a repository unless you want to destroy it.</b>
+ * <p>
+ * To create the input files, in the source repository use:
+ *
+ * <pre>
+ * git for-each-ref &gt;in.refs
+ * git log --all '--pretty=format:%H %ct %P' &gt;in.dag
+ * </pre>
+ * <p>
+ * Run the rebuild in either an empty repository, or a clone of the source. Any
+ * missing commits (which might be the entire graph) will be created. All refs
+ * will be modified to match the input exactly, which means some refs may be
+ * deleted from the current repository.
+ * <p>
+ */
+class RebuildCommitGraph extends TextBuiltin {
+ private final String REALLY = "--destroy-this-repository";
+
+ @Option(name = REALLY, usage = "approve destruction of repository")
+ boolean really;
+
+ @Argument(index = 0, required = true, metaVar = "REFS", usage = "for-each-ref output")
+ File refList;
+
+ @Argument(index = 1, required = true, metaVar = "DAG", usage = "log --all '--pretty=format:%H %ct %P' output")
+ File graph;
+
+ private final ProgressMonitor pm = new TextProgressMonitor();
+
+ private Map<ObjectId, ObjectId> rewrites = new HashMap<ObjectId, ObjectId>();
+
+ @Override
+ protected void run() throws Exception {
+ if (!really && !db.getAllRefs().isEmpty()) {
+ final StringBuilder m = new StringBuilder();
+ m.append("fatal: ");
+ m.append("This program will destroy the repository:");
+ m.append("\n");
+ m.append("fatal:\n");
+ m.append("fatal: ");
+ m.append(db.getDirectory().getAbsolutePath());
+ m.append("\n");
+ m.append("fatal:\n");
+ m.append("fatal: ");
+ m.append("To continue, add ");
+ m.append(REALLY);
+ m.append(" to the command line");
+ m.append("\n");
+ m.append("fatal:");
+ System.err.println(m);
+ throw die("Need approval to destroy current repository");
+ }
+ if (!refList.isFile())
+ throw die("no such file: " + refList.getPath());
+ if (!graph.isFile())
+ throw die("no such file: " + graph.getPath());
+
+ recreateCommitGraph();
+ detachHead();
+ deleteAllRefs();
+ recreateRefs();
+ }
+
+ private void recreateCommitGraph() throws IOException {
+ final RevWalk rw = new RevWalk(db);
+ final Map<ObjectId, ToRewrite> toRewrite = new HashMap<ObjectId, ToRewrite>();
+ List<ToRewrite> queue = new ArrayList<ToRewrite>();
+ final BufferedReader br = new BufferedReader(new InputStreamReader(
+ new FileInputStream(graph), Constants.CHARSET));
+ try {
+ String line;
+ while ((line = br.readLine()) != null) {
+ final String[] parts = line.split("[ \t]{1,}");
+ final ObjectId oldId = ObjectId.fromString(parts[0]);
+ try {
+ rw.parseCommit(oldId);
+ // We have it already. Don't rewrite it.
+ continue;
+ } catch (MissingObjectException mue) {
+ // Fall through and rewrite it.
+ }
+
+ final long time = Long.parseLong(parts[1]) * 1000L;
+ final ObjectId[] parents = new ObjectId[parts.length - 2];
+ for (int i = 0; i < parents.length; i++) {
+ parents[i] = ObjectId.fromString(parts[2 + i]);
+ }
+
+ final ToRewrite t = new ToRewrite(oldId, time, parents);
+ toRewrite.put(oldId, t);
+ queue.add(t);
+ }
+ } finally {
+ br.close();
+ }
+
+ pm.beginTask("Rewriting commits", queue.size());
+ final ObjectWriter ow = new ObjectWriter(db);
+ final ObjectId emptyTree = ow.writeTree(new Tree(db));
+ final PersonIdent me = new PersonIdent("jgit rebuild-commitgraph",
+ "rebuild-commitgraph@localhost");
+ while (!queue.isEmpty()) {
+ final ListIterator<ToRewrite> itr = queue
+ .listIterator(queue.size());
+ queue = new ArrayList<ToRewrite>();
+ REWRITE: while (itr.hasPrevious()) {
+ final ToRewrite t = itr.previous();
+ final ObjectId[] newParents = new ObjectId[t.oldParents.length];
+ for (int k = 0; k < t.oldParents.length; k++) {
+ final ToRewrite p = toRewrite.get(t.oldParents[k]);
+ if (p != null) {
+ if (p.newId == null) {
+ // Must defer until after the parent is rewritten.
+ queue.add(t);
+ continue REWRITE;
+ } else {
+ newParents[k] = p.newId;
+ }
+ } else {
+ // We have the old parent object. Use it.
+ //
+ newParents[k] = t.oldParents[k];
+ }
+ }
+
+ final Commit newc = new Commit(db);
+ newc.setTreeId(emptyTree);
+ newc.setAuthor(new PersonIdent(me, new Date(t.commitTime)));
+ newc.setCommitter(newc.getAuthor());
+ newc.setParentIds(newParents);
+ newc.setMessage("ORIGINAL " + t.oldId.name() + "\n");
+ t.newId = ow.writeCommit(newc);
+ rewrites.put(t.oldId, t.newId);
+ pm.update(1);
+ }
+ }
+ pm.endTask();
+ }
+
+ private static class ToRewrite {
+ final ObjectId oldId;
+
+ final long commitTime;
+
+ final ObjectId[] oldParents;
+
+ ObjectId newId;
+
+ ToRewrite(final ObjectId o, final long t, final ObjectId[] p) {
+ oldId = o;
+ commitTime = t;
+ oldParents = p;
+ }
+ }
+
+ private void detachHead() throws IOException {
+ final String head = db.getFullBranch();
+ final ObjectId id = db.resolve(Constants.HEAD);
+ if (!ObjectId.isId(head) && id != null) {
+ final LockFile lf;
+ lf = new LockFile(new File(db.getDirectory(), Constants.HEAD));
+ if (!lf.lock())
+ throw new IOException("Cannot lock HEAD");
+ lf.write(id);
+ if (!lf.commit())
+ throw new IOException("Cannot deatch HEAD");
+ }
+ }
+
+ private void deleteAllRefs() throws Exception {
+ final RevWalk rw = new RevWalk(db);
+ for (final Ref r : db.getAllRefs().values()) {
+ if (Constants.HEAD.equals(r.getName()))
+ continue;
+ final RefUpdate u = db.updateRef(r.getName());
+ u.setForceUpdate(true);
+ u.delete(rw);
+ }
+ }
+
+ private void recreateRefs() throws Exception {
+ final Map<String, Ref> refs = computeNewRefs();
+ new RefWriter(refs.values()) {
+ @Override
+ protected void writeFile(final String name, final byte[] content)
+ throws IOException {
+ final File file = new File(db.getDirectory(), name);
+ final LockFile lck = new LockFile(file);
+ if (!lck.lock())
+ throw new ObjectWritingException("Can't write " + file);
+ try {
+ lck.write(content);
+ } catch (IOException ioe) {
+ throw new ObjectWritingException("Can't write " + file);
+ }
+ if (!lck.commit())
+ throw new ObjectWritingException("Can't write " + file);
+ }
+ }.writePackedRefs();
+ }
+
+ private Map<String, Ref> computeNewRefs() throws IOException {
+ final RevWalk rw = new RevWalk(db);
+ final Map<String, Ref> refs = new HashMap<String, Ref>();
+ final BufferedReader br = new BufferedReader(new InputStreamReader(
+ new FileInputStream(refList), Constants.CHARSET));
+ try {
+ String line;
+ while ((line = br.readLine()) != null) {
+ final String[] parts = line.split("[ \t]{1,}");
+ final ObjectId origId = ObjectId.fromString(parts[0]);
+ final String type = parts[1];
+ final String name = parts[2];
+
+ ObjectId id = rewrites.get(origId);
+ if (id == null)
+ id = origId;
+ try {
+ rw.parseAny(id);
+ } catch (MissingObjectException mue) {
+ if (!Constants.TYPE_COMMIT.equals(type)) {
+ System.err.println("skipping " + type + " " + name);
+ continue;
+ }
+ throw new MissingObjectException(id, type);
+ }
+ refs.put(name, new Ref(Ref.Storage.PACKED, name, id));
+ }
+ } finally {
+ br.close();
+ }
+ return refs;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
new file mode 100644
index 0000000..29cdc98
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheTree;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+class ShowCacheTree extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final DirCache cache = DirCache.read(db);
+ final DirCacheTree tree = cache.getCacheTree(false);
+ if (tree == null)
+ throw die("no 'TREE' section in index");
+ show(tree);
+ }
+
+ private void show(final DirCacheTree tree) {
+ out.print("\"");
+ out.print(tree.getPathString());
+ out.print("\"");
+ out.print(": ");
+ out.print(tree.getEntrySpan());
+ out.print(" entries");
+ out.print(", ");
+ out.print(tree.getChildCount());
+ out.print(" children");
+ out.println();
+
+ for (int i = 0; i < tree.getChildCount(); i++)
+ show(tree.getChild(i));
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
new file mode 100644
index 0000000..063cab5
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import java.net.URL;
+
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.pgm.Command;
+import org.eclipse.jgit.pgm.CommandCatalog;
+import org.eclipse.jgit.pgm.CommandRef;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+@Command(usage = "Display a list of all registered jgit commands")
+class ShowCommands extends TextBuiltin {
+ @Option(name = "--pretty", usage = "alter the detail shown")
+ private Format pretty = Format.USAGE;
+
+ @Override
+ protected void run() throws Exception {
+ final CommandRef[] list = CommandCatalog.all();
+
+ int width = 0;
+ for (final CommandRef c : list)
+ width = Math.max(width, c.getName().length());
+ width += 2;
+
+ for (final CommandRef c : list) {
+ System.err.print(c.isCommon() ? '*' : ' ');
+ System.err.print(' ');
+
+ System.err.print(c.getName());
+ for (int i = c.getName().length(); i < width; i++)
+ System.err.print(' ');
+
+ pretty.print(c);
+ System.err.println();
+ }
+ System.err.println();
+ }
+
+ static enum Format {
+ /** */
+ USAGE {
+ void print(final CommandRef c) {
+ System.err.print(c.getUsage());
+ }
+ },
+
+ /** */
+ CLASSES {
+ void print(final CommandRef c) {
+ System.err.print(c.getImplementationClassName());
+ }
+ },
+
+ /** */
+ URLS {
+ void print(final CommandRef c) {
+ final ClassLoader ldr = c.getImplementationClassLoader();
+
+ String cn = c.getImplementationClassName();
+ cn = cn.replace('.', '/') + ".class";
+
+ final URL url = ldr.getResource(cn);
+ if (url == null) {
+ System.err.print("!! NOT FOUND !!");
+ return;
+ }
+
+ String rn = url.toExternalForm();
+ if (rn.endsWith(cn))
+ rn = rn.substring(0, rn.length() - cn.length());
+
+ System.err.print(rn);
+ }
+ };
+
+ abstract void print(CommandRef c);
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
new file mode 100644
index 0000000..854596c
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008, Jonas Fonseca <fonseca@diku.dk>
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheEntry;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+class ShowDirCache extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final SimpleDateFormat fmt;
+ fmt = new SimpleDateFormat("yyyyMMdd,HHmmss.SSS");
+
+ final DirCache cache = DirCache.read(db);
+ for (int i = 0; i < cache.getEntryCount(); i++) {
+ final DirCacheEntry ent = cache.getEntry(i);
+ final FileMode mode = FileMode.fromBits(ent.getRawMode());
+ final int len = ent.getLength();
+ final Date mtime = new Date(ent.getLastModified());
+
+ out.print(mode);
+ out.format(" %6d", len);
+ out.print(' ');
+ out.print(fmt.format(mtime));
+ out.print(' ');
+ out.print(ent.getObjectId().name());
+ out.print('\t');
+ out.print(ent.getPathString());
+ out.println();
+ }
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java
new file mode 100644
index 0000000..54301dd
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.debug;
+
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+class WriteDirCache extends TextBuiltin {
+ @Override
+ protected void run() throws Exception {
+ final DirCache cache = DirCache.read(db);
+ if (!cache.lock())
+ throw die("failed to lock index");
+ cache.read();
+ cache.write();
+ if (!cache.commit())
+ throw die("failed to commit index");
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
new file mode 100644
index 0000000..c31676d
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2008-2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.errors.IncorrectObjectTypeException;
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.WindowCursor;
+import org.eclipse.jgit.treewalk.AbstractTreeIterator;
+import org.eclipse.jgit.treewalk.CanonicalTreeParser;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+
+/**
+ * Custom argument handler {@link AbstractTreeIterator} from string values.
+ * <p>
+ * Assumes the parser has been initialized with a Repository.
+ */
+public class AbstractTreeIteratorHandler extends
+ OptionHandler<AbstractTreeIterator> {
+ private final org.eclipse.jgit.pgm.opt.CmdLineParser clp;
+
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public AbstractTreeIteratorHandler(final CmdLineParser parser,
+ final OptionDef option,
+ final Setter<? super AbstractTreeIterator> setter) {
+ super(parser, option, setter);
+ clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ final String name = params.getParameter(0);
+
+ if (new File(name).isDirectory()) {
+ setter.addValue(new FileTreeIterator(new File(name)));
+ return 1;
+ }
+
+ if (new File(name).isFile()) {
+ final DirCache dirc;
+ try {
+ dirc = DirCache.read(new File(name));
+ } catch (IOException e) {
+ throw new CmdLineException(name + " is not an index file", e);
+ }
+ setter.addValue(new DirCacheIterator(dirc));
+ return 1;
+ }
+
+ final ObjectId id;
+ try {
+ id = clp.getRepository().resolve(name);
+ } catch (IOException e) {
+ throw new CmdLineException(e.getMessage());
+ }
+ if (id == null)
+ throw new CmdLineException(name + " is not a tree");
+
+ final CanonicalTreeParser p = new CanonicalTreeParser();
+ final WindowCursor curs = new WindowCursor();
+ try {
+ p.reset(clp.getRepository(), clp.getRevWalk().parseTree(id), curs);
+ } catch (MissingObjectException e) {
+ throw new CmdLineException(name + " is not a tree");
+ } catch (IncorrectObjectTypeException e) {
+ throw new CmdLineException(name + " is not a tree");
+ } catch (IOException e) {
+ throw new CmdLineException("cannot read " + name + ": "
+ + e.getMessage());
+ } finally {
+ curs.release();
+ }
+
+ setter.addValue(p);
+ return 1;
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "tree-ish";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
new file mode 100644
index 0000000..a126fb1
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.util.ArrayList;
+
+import org.kohsuke.args4j.Argument;
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.IllegalAnnotationError;
+import org.kohsuke.args4j.Option;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.pgm.TextBuiltin;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.treewalk.AbstractTreeIterator;
+
+/**
+ * Extended command line parser which handles --foo=value arguments.
+ * <p>
+ * The args4j package does not natively handle --foo=value and instead prefers
+ * to see --foo value on the command line. Many users are used to the GNU style
+ * --foo=value long option, so we convert from the GNU style format to the
+ * args4j style format prior to invoking args4j for parsing.
+ */
+public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
+ static {
+ registerHandler(AbstractTreeIterator.class,
+ AbstractTreeIteratorHandler.class);
+ registerHandler(ObjectId.class, ObjectIdHandler.class);
+ registerHandler(RefSpec.class, RefSpecHandler.class);
+ registerHandler(RevCommit.class, RevCommitHandler.class);
+ registerHandler(RevTree.class, RevTreeHandler.class);
+ }
+
+ private final Repository db;
+
+ private RevWalk walk;
+
+ /**
+ * Creates a new command line owner that parses arguments/options and set
+ * them into the given object.
+ *
+ * @param bean
+ * instance of a class annotated by {@link Option} and
+ * {@link Argument}. this object will receive values.
+ *
+ * @throws IllegalAnnotationError
+ * if the option bean class is using args4j annotations
+ * incorrectly.
+ */
+ public CmdLineParser(final Object bean) {
+ this(bean, null);
+ }
+
+ /**
+ * Creates a new command line owner that parses arguments/options and set
+ * them into the given object.
+ *
+ * @param bean
+ * instance of a class annotated by {@link Option} and
+ * {@link Argument}. this object will receive values.
+ * @param repo
+ * repository this parser can translate options through.
+ * @throws IllegalAnnotationError
+ * if the option bean class is using args4j annotations
+ * incorrectly.
+ */
+ public CmdLineParser(final Object bean, Repository repo) {
+ super(bean);
+ if (repo == null && bean instanceof TextBuiltin)
+ repo = ((TextBuiltin) bean).getRepository();
+ this.db = repo;
+ }
+
+ @Override
+ public void parseArgument(final String... args) throws CmdLineException {
+ final ArrayList<String> tmp = new ArrayList<String>(args.length);
+ for (int argi = 0; argi < args.length; argi++) {
+ final String str = args[argi];
+ if (str.equals("--")) {
+ while (argi < args.length)
+ tmp.add(args[argi++]);
+ break;
+ }
+
+ if (str.startsWith("--")) {
+ final int eq = str.indexOf('=');
+ if (eq > 0) {
+ tmp.add(str.substring(0, eq));
+ tmp.add(str.substring(eq + 1));
+ continue;
+ }
+ }
+
+ tmp.add(str);
+ }
+
+ super.parseArgument(tmp.toArray(new String[tmp.size()]));
+ }
+
+ /**
+ * Get the repository this parser translates values through.
+ *
+ * @return the repository, if specified during construction.
+ */
+ public Repository getRepository() {
+ if (db == null)
+ throw new IllegalStateException("No Git repository configured.");
+ return db;
+ }
+
+ /**
+ * Get the revision walker used to support option parsing.
+ *
+ * @return the revision walk used by this option parser.
+ */
+ public RevWalk getRevWalk() {
+ if (walk == null)
+ walk = new RevWalk(getRepository());
+ return walk;
+ }
+
+ /**
+ * Get the revision walker used to support option parsing.
+ * <p>
+ * This method does not initialize the RevWalk and may return null.
+ *
+ * @return the revision walk used by this option parser, or null.
+ */
+ public RevWalk getRevWalkGently() {
+ return walk;
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java
new file mode 100644
index 0000000..d3f460c
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.io.IOException;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.lib.ObjectId;
+
+/**
+ * Custom argument handler {@link ObjectId} from string values.
+ * <p>
+ * Assumes the parser has been initialized with a Repository.
+ */
+public class ObjectIdHandler extends OptionHandler<ObjectId> {
+ private final org.eclipse.jgit.pgm.opt.CmdLineParser clp;
+
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public ObjectIdHandler(final CmdLineParser parser, final OptionDef option,
+ final Setter<? super ObjectId> setter) {
+ super(parser, option, setter);
+ clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ final String name = params.getParameter(0);
+ final ObjectId id;
+ try {
+ id = clp.getRepository().resolve(name);
+ } catch (IOException e) {
+ throw new CmdLineException(e.getMessage());
+ }
+ if (id != null) {
+ setter.addValue(id);
+ return 1;
+ }
+
+ throw new CmdLineException(name + " is not an object");
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "object";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
new file mode 100644
index 0000000..bebf3d9
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.Option;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.treewalk.filter.PathFilter;
+import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+
+/**
+ * Create a {@link TreeFilter} to patch math names.
+ * <p>
+ * This handler consumes all arguments to the end of the command line, and is
+ * meant to be used on an {@link Option} of name "--".
+ */
+public class PathTreeFilterHandler extends OptionHandler<TreeFilter> {
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public PathTreeFilterHandler(final CmdLineParser parser,
+ final OptionDef option, final Setter<? super TreeFilter> setter) {
+ super(parser, option, setter);
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ final List<PathFilter> filters = new ArrayList<PathFilter>();
+ for (int idx = 0;; idx++) {
+ final String path;
+ try {
+ path = params.getParameter(idx);
+ } catch (CmdLineException cle) {
+ break;
+ }
+ filters.add(PathFilter.create(path));
+ }
+
+ if (filters.size() == 0)
+ return 0;
+ if (filters.size() == 1) {
+ setter.addValue(filters.get(0));
+ return 1;
+ }
+ setter.addValue(PathFilterGroup.create(filters));
+ return filters.size();
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "path ...";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java
new file mode 100644
index 0000000..133c5f8
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.transport.RefSpec;
+
+/**
+ * Custom argument handler {@link RefSpec} from string values.
+ * <p>
+ * Assumes the parser has been initialized with a Repository.
+ */
+public class RefSpecHandler extends OptionHandler<RefSpec> {
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public RefSpecHandler(final CmdLineParser parser, final OptionDef option,
+ final Setter<? super RefSpec> setter) {
+ super(parser, option, setter);
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ setter.addValue(new RefSpec(params.getParameter(0)));
+ return 1;
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "refspec";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
new file mode 100644
index 0000000..01caaf2
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.io.IOException;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.errors.IncorrectObjectTypeException;
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevFlag;
+
+/**
+ * Custom argument handler {@link RevCommit} from string values.
+ * <p>
+ * Assumes the parser has been initialized with a Repository.
+ */
+public class RevCommitHandler extends OptionHandler<RevCommit> {
+ private final org.eclipse.jgit.pgm.opt.CmdLineParser clp;
+
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public RevCommitHandler(final CmdLineParser parser, final OptionDef option,
+ final Setter<? super RevCommit> setter) {
+ super(parser, option, setter);
+ clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ String name = params.getParameter(0);
+
+ boolean interesting = true;
+ if (name.startsWith("^")) {
+ name = name.substring(1);
+ interesting = false;
+ }
+
+ final int dot2 = name.indexOf("..");
+ if (dot2 != -1) {
+ if (!option.isMultiValued())
+ throw new CmdLineException("Only one " + option.metaVar()
+ + " expected in " + name + "." + "");
+
+ final String left = name.substring(0, dot2);
+ final String right = name.substring(dot2 + 2);
+ addOne(left, false);
+ addOne(right, true);
+ return 1;
+ }
+
+ addOne(name, interesting);
+ return 1;
+ }
+
+ private void addOne(final String name, final boolean interesting)
+ throws CmdLineException {
+ final ObjectId id;
+ try {
+ id = clp.getRepository().resolve(name);
+ } catch (IOException e) {
+ throw new CmdLineException(e.getMessage());
+ }
+ if (id == null)
+ throw new CmdLineException(name + " is not a commit");
+
+ final RevCommit c;
+ try {
+ c = clp.getRevWalk().parseCommit(id);
+ } catch (MissingObjectException e) {
+ throw new CmdLineException(name + " is not a commit");
+ } catch (IncorrectObjectTypeException e) {
+ throw new CmdLineException(name + " is not a commit");
+ } catch (IOException e) {
+ throw new CmdLineException("cannot read " + name + ": "
+ + e.getMessage());
+ }
+
+ if (interesting)
+ c.remove(RevFlag.UNINTERESTING);
+ else
+ c.add(RevFlag.UNINTERESTING);
+
+ setter.addValue(c);
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "commit-ish";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
new file mode 100644
index 0000000..c564b9b
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2009, Google Inc.
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.io.IOException;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.errors.IncorrectObjectTypeException;
+import org.eclipse.jgit.errors.MissingObjectException;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.revwalk.RevTree;
+
+/**
+ * Custom argument handler {@link RevTree} from string values.
+ * <p>
+ * Assumes the parser has been initialized with a Repository.
+ */
+public class RevTreeHandler extends OptionHandler<RevTree> {
+ private final org.eclipse.jgit.pgm.opt.CmdLineParser clp;
+
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public RevTreeHandler(final CmdLineParser parser, final OptionDef option,
+ final Setter<? super RevTree> setter) {
+ super(parser, option, setter);
+ clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ final String name = params.getParameter(0);
+ final ObjectId id;
+ try {
+ id = clp.getRepository().resolve(name);
+ } catch (IOException e) {
+ throw new CmdLineException(e.getMessage());
+ }
+ if (id == null)
+ throw new CmdLineException(name + " is not a tree");
+
+ final RevTree c;
+ try {
+ c = clp.getRevWalk().parseTree(id);
+ } catch (MissingObjectException e) {
+ throw new CmdLineException(name + " is not a tree");
+ } catch (IncorrectObjectTypeException e) {
+ throw new CmdLineException(name + " is not a tree");
+ } catch (IOException e) {
+ throw new CmdLineException("cannot read " + name + ": "
+ + e.getMessage());
+ }
+ setter.addValue(c);
+ return 1;
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "tree-ish";
+ }
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java
new file mode 100644
index 0000000..3378f38
--- /dev/null
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.pgm.opt;
+
+import java.text.MessageFormat;
+
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.kohsuke.args4j.OptionDef;
+import org.kohsuke.args4j.spi.OptionHandler;
+import org.kohsuke.args4j.spi.Parameters;
+import org.kohsuke.args4j.spi.Setter;
+import org.eclipse.jgit.pgm.CommandCatalog;
+import org.eclipse.jgit.pgm.CommandRef;
+import org.eclipse.jgit.pgm.TextBuiltin;
+
+/**
+ * Custom Argument handler for jgit command selection.
+ * <p>
+ * Translates a single argument string to a {@link TextBuiltin} instance which
+ * we can execute at runtime with the remaining arguments of the parser.
+ */
+public class SubcommandHandler extends OptionHandler<TextBuiltin> {
+ /**
+ * Create a new handler for the command name.
+ * <p>
+ * This constructor is used only by args4j.
+ *
+ * @param parser
+ * @param option
+ * @param setter
+ */
+ public SubcommandHandler(final CmdLineParser parser,
+ final OptionDef option, final Setter<? super TextBuiltin> setter) {
+ super(parser, option, setter);
+ }
+
+ @Override
+ public int parseArguments(final Parameters params) throws CmdLineException {
+ final String name = params.getParameter(0);
+ final CommandRef cr = CommandCatalog.get(name);
+ if (cr == null)
+ throw new CmdLineException(MessageFormat.format(
+ "{0} is not a jgit command", name));
+
+ // Force option parsing to stop. Everything after us should
+ // be arguments known only to this command and must not be
+ // recognized by the current parser.
+ //
+ owner.stopOptionParsing();
+ setter.addValue(cr.create());
+ return 1;
+ }
+
+ @Override
+ public String getDefaultMetaVariable() {
+ return "command";
+ }
+}
diff --git a/org.eclipse.jgit.test/.classpath b/org.eclipse.jgit.test/.classpath
new file mode 100644
index 0000000..cb944bd
--- /dev/null
+++ b/org.eclipse.jgit.test/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**/*.idx|**/*.pack" kind="src" path="tst"/>
+ <classpathentry kind="src" path="tst-rsrc"/>
+ <classpathentry kind="src" path="exttst"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.jgit"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
+ <classpathentry kind="lib" path="/org.eclipse.jgit/lib/jsch-0.1.37.jar" sourcepath="/org.eclipse.jgit/lib/jsch-0.1.37.zip"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jgit.test/.gitignore b/org.eclipse.jgit.test/.gitignore
new file mode 100644
index 0000000..9d7d138
--- /dev/null
+++ b/org.eclipse.jgit.test/.gitignore
@@ -0,0 +1,3 @@
+bin
+tst/todopack
+trash
diff --git a/org.eclipse.jgit.test/.project b/org.eclipse.jgit.test/.project
new file mode 100644
index 0000000..a7242a0
--- /dev/null
+++ b/org.eclipse.jgit.test/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jgit.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..6a9621d
--- /dev/null
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,6 @@
+#Sat Dec 20 21:21:24 CET 2008
+eclipse.preferences.version=1
+encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch=ISO-8859-1
+encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch=ISO-8859-1
+encoding//tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch=ISO-8859-1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..72987c2
--- /dev/null
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Mon Mar 24 18:55:56 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8bfa5f1
--- /dev/null
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,320 @@
+#Tue Feb 05 00:01:29 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
diff --git a/org.eclipse.jgit.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..fce94cf
--- /dev/null
+++ b/org.eclipse.jgit.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,10 @@
+#Thu Dec 20 01:31:04 CET 2007
+eclipse.preferences.version=1
+formatter_profile=_JGit
+formatter_settings_version=10
+internal.default.compliance=default
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/SpeedTestBase.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/SpeedTestBase.java
new file mode 100644
index 0000000..b53a4e4
--- /dev/null
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/SpeedTestBase.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2007-2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.lib;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+/**
+ * Base class for performance unit test.
+ */
+public abstract class SpeedTestBase extends TestCase {
+
+ /**
+ * The time used by native git as this is our reference.
+ */
+ protected long nativeTime;
+
+ /**
+ * Reference to the location of the Linux kernel repo.
+ */
+ protected String kernelrepo;
+
+ /**
+ * Prepare test by running a test against the Linux kernel repo first.
+ *
+ * @param refcmd
+ * git command to execute
+ *
+ * @throws Exception
+ */
+ protected void prepare(String[] refcmd) throws Exception {
+ try {
+ BufferedReader bufferedReader = new BufferedReader(new FileReader("kernel.ref"));
+ try {
+ kernelrepo = bufferedReader.readLine();
+ } finally {
+ bufferedReader.close();
+ }
+ timeNativeGit(kernelrepo, refcmd);
+ nativeTime = timeNativeGit(kernelrepo, refcmd);
+ } catch (Exception e) {
+ System.out.println("Create a file named kernel.ref and put the path to the Linux kernels repository there");
+ throw e;
+ }
+ }
+
+ private static long timeNativeGit(String kernelrepo, String[] refcmd) throws IOException,
+ InterruptedException, Exception {
+ long start = System.currentTimeMillis();
+ Process p = Runtime.getRuntime().exec(refcmd, null, new File(kernelrepo,".."));
+ InputStream inputStream = p.getInputStream();
+ InputStream errorStream = p.getErrorStream();
+ byte[] buf=new byte[1024*1024];
+ for (;;)
+ if (inputStream.read(buf) < 0)
+ break;
+ if (p.waitFor()!=0) {
+ int c;
+ while ((c=errorStream.read())!=-1)
+ System.err.print((char)c);
+ throw new Exception("git log failed");
+ }
+ inputStream.close();
+ errorStream.close();
+ long stop = System.currentTimeMillis();
+ return stop - start;
+ }
+}
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0005_ShallowSpeedTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0005_ShallowSpeedTest.java
new file mode 100644
index 0000000..97b1cf9
--- /dev/null
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0005_ShallowSpeedTest.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2007-2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.lib;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.textui.TestRunner;
+
+public class T0005_ShallowSpeedTest extends SpeedTestBase {
+
+ protected void setUp() throws Exception {
+ prepare(new String[] { "git", "rev-list", "365bbe0d0caaf2ba74d56556827babf0bc66965d" });
+ }
+
+ public void testShallowHistoryScan() throws IOException {
+ long start = System.currentTimeMillis();
+ Repository db = new Repository(new File(kernelrepo));
+ Commit commit = db.mapCommit("365bbe0d0caaf2ba74d56556827babf0bc66965d");
+ int n = 1;
+ for (;;) {
+ ObjectId[] parents = commit.getParentIds();
+ if (parents.length == 0)
+ break;
+ ObjectId parentId = parents[0];
+ commit = db.mapCommit(parentId);
+ commit.getCommitId().name();
+ ++n;
+ }
+ assertEquals(12275, n);
+ long stop = System.currentTimeMillis();
+ long time = stop - start;
+ System.out.println("native="+nativeTime);
+ System.out.println("jgit="+time);
+ // ~0.750s (hot cache), ok
+ /*
+native=1795
+jgit=722
+ */
+ // native git seems to run SLOWER than jgit here, at roughly half the speed
+ // creating the git process is not the issue here, btw.
+ long factor10 = (nativeTime*150/time+50)/100;
+ assertEquals(3, factor10);
+ }
+
+ public static void main(String[] args) {
+ TestRunner.run(T0005_ShallowSpeedTest.class);
+ }
+}
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0006_DeepSpeedTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0006_DeepSpeedTest.java
new file mode 100644
index 0000000..8843ae3
--- /dev/null
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/lib/T0006_DeepSpeedTest.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2007-2008, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.lib;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.textui.TestRunner;
+
+public class T0006_DeepSpeedTest extends SpeedTestBase {
+
+ protected void setUp() throws Exception {
+ prepare(new String[] { "git", "rev-list", "365bbe0d0caaf2ba74d56556827babf0bc66965d","--","net/netfilter/nf_queue.c" });
+ }
+
+ public void testDeepHistoryScan() throws IOException {
+ long start = System.currentTimeMillis();
+ Repository db = new Repository(new File(kernelrepo));
+ Commit commit = db.mapCommit("365bbe0d0caaf2ba74d56556827babf0bc66965d");
+ int n = 1;
+ for (;;) {
+ ObjectId[] parents = commit.getParentIds();
+ if (parents.length == 0)
+ break;
+ ObjectId parentId = parents[0];
+ commit = db.mapCommit(parentId);
+ TreeEntry m = commit.getTree().findBlobMember("net/netfilter/nf_queue.c");
+ if (m != null)
+ commit.getCommitId().name();
+ ++n;
+ }
+
+ assertEquals(12275, n);
+ long stop = System.currentTimeMillis();
+ long time = stop - start;
+ System.out.println("native="+nativeTime);
+ System.out.println("jgit="+time);
+ /*
+ native=1355
+ jgit=5449
+ */
+ // This is not an exact factor, but we'd expect native git to perform this
+ // about 4 times quicker. If for some reason we find jgit to be faster than
+ // this the cause should be found and secured.
+ long factor = (time*110/nativeTime+50)/100;
+ assertEquals(4, factor);
+ }
+
+ public static void main(String[] args) {
+ TestRunner.run(T0006_DeepSpeedTest.class);
+ }
+}
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
new file mode 100644
index 0000000..60d3853
--- /dev/null
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
@@ -0,0 +1,227 @@
+/*
+ * Copyright (C) 2008, Google Inc.
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.patch;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.util.MutableInteger;
+import org.eclipse.jgit.util.RawParseUtils;
+import org.eclipse.jgit.util.TemporaryBuffer;
+
+public class EGitPatchHistoryTest extends TestCase {
+ public void testParseHistory() throws Exception {
+ final NumStatReader numstat = new NumStatReader();
+ numstat.read();
+
+ final HashMap<String, HashMap<String, StatInfo>> stats = numstat.stats;
+ assertEquals(1211, stats.size());
+
+ new PatchReader(stats).read();
+ }
+
+ static class StatInfo {
+ int added, deleted;
+ }
+
+ static class PatchReader extends CommitReader {
+ final HashSet<String> offBy1;
+
+ final HashMap<String, HashMap<String, StatInfo>> stats;
+
+ int errors;
+
+ PatchReader(final HashMap<String, HashMap<String, StatInfo>> s)
+ throws IOException {
+ super(new String[] { "-p" });
+ stats = s;
+
+ offBy1 = new HashSet<String>();
+ offBy1.add("9bda5ece6806cd797416eaa47c7b927cc6e9c3b2");
+ }
+
+ @Override
+ void onCommit(String cid, byte[] buf) {
+ final HashMap<String, StatInfo> files = stats.remove(cid);
+ assertNotNull("No files for " + cid, files);
+
+ final Patch p = new Patch();
+ p.parse(buf, 0, buf.length - 1);
+ assertEquals("File count " + cid, files.size(), p.getFiles().size());
+ if (!p.getErrors().isEmpty()) {
+ for (final FormatError e : p.getErrors()) {
+ System.out.println("error " + e.getMessage());
+ System.out.println(" at " + e.getLineText());
+ }
+ dump(buf);
+ fail("Unexpected error in " + cid);
+ }
+
+ for (final FileHeader fh : p.getFiles()) {
+ final String fileName;
+ if (fh.getChangeType() != FileHeader.ChangeType.DELETE)
+ fileName = fh.getNewName();
+ else
+ fileName = fh.getOldName();
+ final StatInfo s = files.remove(fileName);
+ final String nid = fileName + " in " + cid;
+ assertNotNull("No " + nid, s);
+ int added = 0, deleted = 0;
+ for (final HunkHeader h : fh.getHunks()) {
+ added += h.getOldImage().getLinesAdded();
+ deleted += h.getOldImage().getLinesDeleted();
+ }
+
+ if (s.added == added) {
+ //
+ } else if (s.added == added + 1 && offBy1.contains(cid)) {
+ //
+ } else {
+ dump(buf);
+ assertEquals("Added diff in " + nid, s.added, added);
+ }
+
+ if (s.deleted == deleted) {
+ //
+ } else if (s.deleted == deleted + 1 && offBy1.contains(cid)) {
+ //
+ } else {
+ dump(buf);
+ assertEquals("Deleted diff in " + nid, s.deleted, deleted);
+ }
+ }
+ assertTrue("Missed files in " + cid, files.isEmpty());
+ }
+
+ private static void dump(final byte[] buf) {
+ String str;
+ try {
+ str = new String(buf, 0, buf.length - 1, "ISO-8859-1");
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ System.out.println("<<" + str + ">>");
+ }
+ }
+
+ static class NumStatReader extends CommitReader {
+ final HashMap<String, HashMap<String, StatInfo>> stats = new HashMap<String, HashMap<String, StatInfo>>();
+
+ NumStatReader() throws IOException {
+ super(new String[] { "--numstat" });
+ }
+
+ @Override
+ void onCommit(String commitId, byte[] buf) {
+ final HashMap<String, StatInfo> files = new HashMap<String, StatInfo>();
+ final MutableInteger ptr = new MutableInteger();
+ while (ptr.value < buf.length) {
+ if (buf[ptr.value] == '\n')
+ break;
+ final StatInfo i = new StatInfo();
+ i.added = RawParseUtils.parseBase10(buf, ptr.value, ptr);
+ i.deleted = RawParseUtils.parseBase10(buf, ptr.value + 1, ptr);
+ final int eol = RawParseUtils.nextLF(buf, ptr.value);
+ final String name = RawParseUtils.decode(Constants.CHARSET,
+ buf, ptr.value + 1, eol - 1);
+ files.put(name, i);
+ ptr.value = eol;
+ }
+ stats.put(commitId, files);
+ }
+ }
+
+ static abstract class CommitReader {
+ private Process proc;
+
+ CommitReader(final String[] args) throws IOException {
+ final String[] realArgs = new String[3 + args.length + 1];
+ realArgs[0] = "git";
+ realArgs[1] = "log";
+ realArgs[2] = "--pretty=format:commit %H";
+ System.arraycopy(args, 0, realArgs, 3, args.length);
+ realArgs[3 + args.length] = "a4b98ed15ea5f165a7aa0f2fd2ea6fcce6710925";
+
+ proc = Runtime.getRuntime().exec(realArgs);
+ proc.getOutputStream().close();
+ proc.getErrorStream().close();
+ }
+
+ void read() throws IOException, InterruptedException {
+ final BufferedReader in = new BufferedReader(new InputStreamReader(
+ proc.getInputStream(), "ISO-8859-1"));
+ String commitId = null;
+ TemporaryBuffer buf = null;
+ for (;;) {
+ String line = in.readLine();
+ if (line == null)
+ break;
+ if (line.startsWith("commit ")) {
+ if (buf != null) {
+ buf.close();
+ onCommit(commitId, buf.toByteArray());
+ buf.destroy();
+ }
+ commitId = line.substring("commit ".length());
+ buf = new TemporaryBuffer();
+ } else if (buf != null) {
+ buf.write(line.getBytes("ISO-8859-1"));
+ buf.write('\n');
+ }
+ }
+ in.close();
+ assertEquals(0, proc.waitFor());
+ proc = null;
+ }
+
+ abstract void onCommit(String commitId, byte[] buf);
+ }
+}
diff --git a/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests (Java 6).launch b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests (Java 6).launch
new file mode 100644
index 0000000..9a9ca12
--- /dev/null
+++ b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests (Java 6).launch
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jgit.test"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.test/exttst"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+</launchConfiguration>
diff --git a/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests.launch b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests.launch
new file mode 100644
index 0000000..6735fb0
--- /dev/null
+++ b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-External-Tests.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.test"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jgit.test"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.test/exttst"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+</launchConfiguration>
diff --git a/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests (Java 6).launch b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests (Java 6).launch
new file mode 100644
index 0000000..a0aecf9
--- /dev/null
+++ b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests (Java 6).launch
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jgit.test/tst"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="2"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.test/tst"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.test"/>
+</launchConfiguration>
diff --git a/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests.launch b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests.launch
new file mode 100644
index 0000000..bff41ec
--- /dev/null
+++ b/org.eclipse.jgit.test/org.eclipse.jgit.core--All-Tests.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.test"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jgit.test"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.test/tst"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+</launchConfiguration>
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E.patch
new file mode 100644
index 0000000..9b8fa98
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E.patch
@@ -0,0 +1,6 @@
+diff --git a/E b/E
+index e69de29..7898192 100644
+--- a/E
++++ b/E
+@@ -0,0 +1 @@
++a
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PostImage
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PostImage
@@ -0,0 +1 @@
+a
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PreImage
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/E_PreImage
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X.patch
new file mode 100644
index 0000000..e5363eb
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X.patch
@@ -0,0 +1,24 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -2,2 +2,3 @@ a
+ b
++c
+ d
+@@ -16,4 +17,2 @@ p
+ q
+-r
+-s
+ t
+@@ -22,4 +21,8 @@ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PostImage
new file mode 100644
index 0000000..2d44096
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PostImage
@@ -0,0 +1,28 @@
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+t
+u
+v
+w
+0
+1
+2
+3
+4
+5
+z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PreImage
new file mode 100644
index 0000000..a3648a1
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/X_PreImage
@@ -0,0 +1,25 @@
+a
+b
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y.patch
new file mode 100644
index 0000000..a2c9a0b
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y.patch
@@ -0,0 +1,8 @@
+diff --git a/Y b/Y
+index 2e65efe..7898192 100644
+--- a/Y
++++ b/Y
+@@ -1 +1 @@
+-a
+\ No newline at end of file
++a
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PostImage
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PostImage
@@ -0,0 +1 @@
+a
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PreImage
new file mode 100644
index 0000000..2e65efe
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Y_PreImage
@@ -0,0 +1 @@
+a \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z.patch
new file mode 100644
index 0000000..35a06d6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z.patch
@@ -0,0 +1,8 @@
+diff --git a/Z b/Z
+index 7898192..2e65efe 100644
+--- a/Z
++++ b/Z
+@@ -1 +1 @@
+-a
++a
+\ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PostImage
new file mode 100644
index 0000000..2e65efe
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PostImage
@@ -0,0 +1 @@
+a \ No newline at end of file
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PreImage
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/Z_PreImage
@@ -0,0 +1 @@
+a
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext0.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext0.out
new file mode 100644
index 0000000..d36e3fa
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext0.out
@@ -0,0 +1,18 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -2,0 +3 @@
++c
+@@ -17,2 +17,0 @@
+-r
+-s
+@@ -23,2 +22,6 @@
+-x
+-y
++0
++1
++2
++3
++4
++5
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext1.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext1.out
new file mode 100644
index 0000000..d0d847d
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext1.out
@@ -0,0 +1,24 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -2,2 +2,3 @@
+ b
++c
+ d
+@@ -16,4 +17,2 @@
+ q
+-r
+-s
+ t
+@@ -22,4 +21,8 @@
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext10.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext10.out
new file mode 100644
index 0000000..1d4f242
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext10.out
@@ -0,0 +1,37 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -1,25 +1,28 @@
+ a
+ b
++c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+-r
+-s
+ t
+ u
+ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext100.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext100.out
new file mode 100644
index 0000000..1d4f242
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext100.out
@@ -0,0 +1,37 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -1,25 +1,28 @@
+ a
+ b
++c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
+ l
+ m
+ n
+ o
+ p
+ q
+-r
+-s
+ t
+ u
+ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext3.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext3.out
new file mode 100644
index 0000000..2564016
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext3.out
@@ -0,0 +1,30 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -1,5 +1,6 @@
+ a
+ b
++c
+ d
+ e
+ f
+@@ -14,12 +15,14 @@
+ o
+ p
+ q
+-r
+-s
+ t
+ u
+ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext5.out b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext5.out
new file mode 100644
index 0000000..3073c5f
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/testContext5.out
@@ -0,0 +1,34 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -1,7 +1,8 @@
+ a
+ b
++c
+ d
+ e
+ f
+ g
+ h
+@@ -12,14 +13,16 @@
+ m
+ n
+ o
+ p
+ q
+-r
+-s
+ t
+ u
+ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/.gitattributes b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/.gitattributes
new file mode 100644
index 0000000..b38f87f
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/.gitattributes
@@ -0,0 +1 @@
+*.patch -crlf
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testEditList_Types.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testEditList_Types.patch
new file mode 100644
index 0000000..e5363eb
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testEditList_Types.patch
@@ -0,0 +1,24 @@
+diff --git a/X b/X
+index a3648a1..2d44096 100644
+--- a/X
++++ b/X
+@@ -2,2 +2,3 @@ a
+ b
++c
+ d
+@@ -16,4 +17,2 @@ p
+ q
+-r
+-s
+ t
+@@ -22,4 +21,8 @@ v
+ w
+-x
+-y
++0
++1
++2
++3
++4
++5
+ z
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_BodyTooLong.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_BodyTooLong.patch
new file mode 100644
index 0000000..9506198
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_BodyTooLong.patch
@@ -0,0 +1,17 @@
+diff --git a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+index da7e704..34ce04a 100644
+--- a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
++++ b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+@@ -109,4 +109,11 @@ assertTrue(Arrays.equals(values.toArray(), repositoryConfig
+ .getStringList("my", null, "somename")));
+ checkFile(cfgFile, "[my]\n\tsomename = value1\n\tsomename = value2\n");
+ }
++
++ public void test006_readCaseInsensitive() throws IOException {
++ final File path = writeTrashFile("config_001", "[Foo]\nBar\n");
++ RepositoryConfig repositoryConfig = new RepositoryConfig(null, path);
++BAD LINE
++ assertEquals(true, repositoryConfig.getBoolean("foo", null, "bar", false));
++ assertEquals("", repositoryConfig.getString("foo", null, "bar"));
++ }
+ }
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_CcTruncatedOld.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_CcTruncatedOld.patch
new file mode 100644
index 0000000..1bbcfb5
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_CcTruncatedOld.patch
@@ -0,0 +1,24 @@
+commit 1a56639bbea8e8cbfbe5da87746de97f9217ce9b
+Date: Tue May 13 00:43:56 2008 +0200
+ ...
+
+diff --cc org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
+index 169356b,dd8c317..fd85931
+mode 100644,100644..100755
+--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
++++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
+@@@ -55,12 -163,13 +163,15 @@@ public class UIText extends NLS
+
+ /** */
+ public static String ResourceHistory_toggleCommentWrap;
++
+ /** */
+ + /** */
+ public static String ResourceHistory_toggleRevDetail;
+ /** */
+ public static String ResourceHistory_toggleRevComment;
+ /** */
+ public static String ResourceHistory_toggleTooltips;
+
+
+commit 1a56639bbea8e8cbfbe5da87746de97f9217ce9b
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_DisconnectedHunk.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_DisconnectedHunk.patch
new file mode 100644
index 0000000..3235970
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_DisconnectedHunk.patch
@@ -0,0 +1,30 @@
+From: A. U. Thor
+
+@@ -109,4 +109,11 @@ assertTrue(Arrays.equals(values.toArray(), repositoryConfig
+ .getStringList("my", null, "somename")));
+ checkFile(cfgFile, "[my]\n\tsomename = value1\n\tsomename = value2\n");
+ }
++
++ public void test006_readCaseInsensitive() throws IOException {
++ final File path = writeTrashFile("config_001", "[Foo]\nBar\n");
++ RepositoryConfig repositoryConfig = new RepositoryConfig(null, path);
++ assertEquals(true, repositoryConfig.getBoolean("foo", null, "bar", false));
++ assertEquals("", repositoryConfig.getString("foo", null, "bar"));
++ }
+ }
+diff --git a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+index 45c2f8a..3291bba 100644
+--- a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
++++ b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+@@ -236,9 +236,9 @@ protected boolean getBoolean(final String section, String subsection,
+ return defaultValue;
+
+ n = n.toLowerCase();
+- if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equals(n) || "true".equals(n) || "1".equals(n)) {
++ if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equalsIgnoreCase(n) || "true".equalsIgnoreCase(n) || "1".equals(n)) {
+ return true;
+- } else if ("no".equals(n) || "false".equals(n) || "0".equals(n)) {
++ } else if ("no".equalsIgnoreCase(n) || "false".equalsIgnoreCase(n) || "0".equalsIgnoreCase(n)) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Invalid boolean value: "
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GarbageBetweenFiles.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GarbageBetweenFiles.patch
new file mode 100644
index 0000000..9f6fd6b
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GarbageBetweenFiles.patch
@@ -0,0 +1,33 @@
+diff --git a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+index da7e704..34ce04a 100644
+--- a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
++++ b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+@@ -109,4 +109,11 @@ assertTrue(Arrays.equals(values.toArray(), repositoryConfig
+ .getStringList("my", null, "somename")));
+ checkFile(cfgFile, "[my]\n\tsomename = value1\n\tsomename = value2\n");
+ }
++
++ public void test006_readCaseInsensitive() throws IOException {
++ final File path = writeTrashFile("config_001", "[Foo]\nBar\n");
++ RepositoryConfig repositoryConfig = new RepositoryConfig(null, path);
++ assertEquals(true, repositoryConfig.getBoolean("foo", null, "bar", false));
++ assertEquals("", repositoryConfig.getString("foo", null, "bar"));
++ }
+ }
+I AM NOT HERE
+diff --git a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+index 45c2f8a..3291bba 100644
+--- a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
++++ b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+@@ -236,9 +236,9 @@ protected boolean getBoolean(final String section, String subsection,
+ return defaultValue;
+
+ n = n.toLowerCase();
+- if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equals(n) || "true".equals(n) || "1".equals(n)) {
++ if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equalsIgnoreCase(n) || "true".equalsIgnoreCase(n) || "1".equals(n)) {
+ return true;
+- } else if ("no".equals(n) || "false".equals(n) || "0".equals(n)) {
++ } else if ("no".equalsIgnoreCase(n) || "false".equalsIgnoreCase(n) || "0".equalsIgnoreCase(n)) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Invalid boolean value: "
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GitBinaryNoForwardHunk.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GitBinaryNoForwardHunk.patch
new file mode 100644
index 0000000..e3f3307
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_GitBinaryNoForwardHunk.patch
@@ -0,0 +1,10 @@
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/pushe.png
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetchd.png b/org.spearce.egit.ui/icons/toolbar/fetchd.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..4433c543f2a52b586a3ed5e31b138244107bc239
+GIT binary patch
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetche.png b/org.spearce.egit.ui/icons/toolbar/fetche.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..0ffeb419e6ab302caa5e58661854b33853dc43dc
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedNew.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedNew.patch
new file mode 100644
index 0000000..f10a433
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedNew.patch
@@ -0,0 +1,15 @@
+diff --git a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+index 45c2f8a..3291bba 100644
+--- a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
++++ b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+@@ -236,9 +236,9 @@ protected boolean getBoolean(final String section, String subsection,
+ return defaultValue;
+
+ n = n.toLowerCase();
+- if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equals(n) || "true".equals(n) || "1".equals(n)) {
+ return true;
+- } else if ("no".equals(n) || "false".equals(n) || "0".equals(n)) {
++ } else if ("no".equalsIgnoreCase(n) || "false".equalsIgnoreCase(n) || "0".equalsIgnoreCase(n)) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Invalid boolean value: "
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedOld.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedOld.patch
new file mode 100644
index 0000000..42363c6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testError_TruncatedOld.patch
@@ -0,0 +1,15 @@
+diff --git a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+index 45c2f8a..3291bba 100644
+--- a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
++++ b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+@@ -236,9 +236,9 @@ protected boolean getBoolean(final String section, String subsection,
+ return defaultValue;
+
+ n = n.toLowerCase();
+- if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equals(n) || "true".equals(n) || "1".equals(n)) {
++ if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equalsIgnoreCase(n) || "true".equalsIgnoreCase(n) || "1".equals(n)) {
+ return true;
++ } else if ("no".equalsIgnoreCase(n) || "false".equalsIgnoreCase(n) || "0".equalsIgnoreCase(n)) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Invalid boolean value: "
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch
new file mode 100644
index 0000000..8224fcc
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_BothISO88591.patch
@@ -0,0 +1,21 @@
+diff --git a/X b/X
+index 014ef30..8c80a36 100644
+--- a/X
++++ b/X
+@@ -1,7 +1,7 @@
+ a
+ b
+ c
+-Ångström
++line 4 Ångström
+ d
+ e
+ f
+@@ -13,6 +13,6 @@ k
+ l
+ m
+ n
+-Ångström
++Ångström; line 16
+ o
+ p
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch
new file mode 100644
index 0000000..a43fef5
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_Convert.patch
@@ -0,0 +1,21 @@
+diff --git a/X b/X
+index 014ef30..209db0d 100644
+--- a/X
++++ b/X
+@@ -1,7 +1,7 @@
+ a
+ b
+ c
+-Ångström
++Ångström
+ d
+ e
+ f
+@@ -13,6 +13,6 @@ k
+ l
+ m
+ n
+-Ångström
++Ångström
+ o
+ p
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch
new file mode 100644
index 0000000..3f74a52
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_DiffCc.patch
@@ -0,0 +1,13 @@
+diff --cc X
+index bdfc9f4,209db0d..474bd69
+--- a/X
++++ b/X
+@@@ -1,7 -1,7 +1,7 @@@
+ a
+--b
+ c
+ +test Ångström
++ Ångström
+ d
+ e
+ f
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_NoBinary.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_NoBinary.patch
new file mode 100644
index 0000000..e4968dc
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testGetText_NoBinary.patch
@@ -0,0 +1,4 @@
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetchd.png b/org.spearce.egit.ui/icons/toolbar/fetchd.png
+new file mode 100644
+index 0000000..4433c54
+Binary files /dev/null and b/org.spearce.egit.ui/icons/toolbar/fetchd.png differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_AddNoNewline.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_AddNoNewline.patch
new file mode 100644
index 0000000..3060952
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_AddNoNewline.patch
@@ -0,0 +1,20 @@
+From ca4719a4b2d93a469f61d1ddfb3e39ecbabfcd69 Mon Sep 17 00:00:00 2001
+From: Shawn O. Pearce <sop@google.com>
+Date: Fri, 12 Dec 2008 12:35:14 -0800
+Subject: [PATCH] introduce no lf again
+
+---
+ a | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/a b/a
+index f2ad6c7..c59d9b6 100644
+--- a/a
++++ b/a
+@@ -1 +1 @@
+-c
++d
+\ No newline at end of file
+--
+1.6.1.rc2.306.ge5d5e
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcDeleteFile.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcDeleteFile.patch
new file mode 100644
index 0000000..2654e09
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcDeleteFile.patch
@@ -0,0 +1,12 @@
+commit 740709ece2412856c0c3eabd4dc4a4cf115b0de6
+Merge: 5c19b43... 13a2c0d...
+Author: Shawn O. Pearce <sop@google.com>
+Date: Fri Dec 12 13:26:52 2008 -0800
+
+ Merge branch 'b' into d
+
+diff --cc a
+index 7898192,2e65efe..0000000
+deleted file mode 100644,100644
+--- a/a
++++ /dev/null
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcNewFile.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcNewFile.patch
new file mode 100644
index 0000000..1a9b7b0
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_CcNewFile.patch
@@ -0,0 +1,14 @@
+commit 6cb8160a4717d51fd3cc0baf721946daa60cf921
+Merge: 5c19b43... 13a2c0d...
+Author: Shawn O. Pearce <sop@google.com>
+Date: Fri Dec 12 13:26:52 2008 -0800
+
+ Merge branch 'b' into d
+
+diff --cc d
+index 0000000,0000000..4bcfe98
+new file mode 100644
+--- /dev/null
++++ b/d
+@@@ -1,0 -1,0 +1,1 @@@
+++d
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_ConfigCaseInsensitive.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_ConfigCaseInsensitive.patch
new file mode 100644
index 0000000..bfb9b15
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_ConfigCaseInsensitive.patch
@@ -0,0 +1,67 @@
+From ce9b593ddf2530613f6da9d7f7e4a5ff93da8b36 Mon Sep 17 00:00:00 2001
+From: Robin Rosenberg <robin.rosenberg@dewire.com>
+Date: Mon, 13 Oct 2008 00:50:59 +0200
+Subject: [PATCH] git config file is case insensitive
+
+Keys are now always compared with ignore case rules.
+
+Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
+Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
+---
+ .../org/spearce/jgit/lib/RepositoryConfigTest.java | 7 +++++++
+ .../src/org/spearce/jgit/lib/RepositoryConfig.java | 8 ++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+index da7e704..34ce04a 100644
+--- a/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
++++ b/org.eclipse.jgit.test/tst/org/spearce/jgit/lib/RepositoryConfigTest.java
+@@ -109,4 +109,11 @@ assertTrue(Arrays.equals(values.toArray(), repositoryConfig
+ .getStringList("my", null, "somename")));
+ checkFile(cfgFile, "[my]\n\tsomename = value1\n\tsomename = value2\n");
+ }
++
++ public void test006_readCaseInsensitive() throws IOException {
++ final File path = writeTrashFile("config_001", "[Foo]\nBar\n");
++ RepositoryConfig repositoryConfig = new RepositoryConfig(null, path);
++ assertEquals(true, repositoryConfig.getBoolean("foo", null, "bar", false));
++ assertEquals("", repositoryConfig.getString("foo", null, "bar"));
++ }
+ }
+diff --git a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+index 45c2f8a..3291bba 100644
+--- a/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
++++ b/org.eclipse.jgit/src/org/spearce/jgit/lib/RepositoryConfig.java
+@@ -236,9 +236,9 @@ protected boolean getBoolean(final String section, String subsection,
+ return defaultValue;
+
+ n = n.toLowerCase();
+- if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equals(n) || "true".equals(n) || "1".equals(n)) {
++ if (MAGIC_EMPTY_VALUE.equals(n) || "yes".equalsIgnoreCase(n) || "true".equalsIgnoreCase(n) || "1".equals(n)) {
+ return true;
+- } else if ("no".equals(n) || "false".equals(n) || "0".equals(n)) {
++ } else if ("no".equalsIgnoreCase(n) || "false".equalsIgnoreCase(n) || "0".equalsIgnoreCase(n)) {
+ return false;
+ } else {
+ throw new IllegalArgumentException("Invalid boolean value: "
+@@ -300,7 +300,7 @@ public String getString(final String section, String subsection, final String na
+ final Set<String> result = new HashSet<String>();
+
+ for (final Entry e : entries) {
+- if (section.equals(e.base) && e.extendedBase != null)
++ if (section.equalsIgnoreCase(e.base) && e.extendedBase != null)
+ result.add(e.extendedBase);
+ }
+ if (baseConfig != null)
+@@ -954,7 +954,7 @@ private static boolean eq(final String a, final String b) {
+ return true;
+ if (a == null || b == null)
+ return false;
+- return a.equals(b);
++ return a.equalsIgnoreCase(b);
+ }
+ }
+ }
+--
+1.6.1.rc2.299.gead4c
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_FixNoNewline.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_FixNoNewline.patch
new file mode 100644
index 0000000..e8af2e7
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_FixNoNewline.patch
@@ -0,0 +1,20 @@
+From 1beb3ec1fe68ff18b0287396096442e12c34787a Mon Sep 17 00:00:00 2001
+From: Shawn O. Pearce <sop@google.com>
+Date: Fri, 12 Dec 2008 12:29:45 -0800
+Subject: [PATCH] make c and add lf
+
+---
+ a | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/a b/a
+index 2e65efe..f2ad6c7 100644
+--- a/a
++++ b/a
+@@ -1 +1 @@
+-a
+\ No newline at end of file
++c
+--
+1.6.1.rc2.306.ge5d5e
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryDelta.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryDelta.patch
new file mode 100644
index 0000000..5b2c9c6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryDelta.patch
@@ -0,0 +1,21 @@
+From 7e49721ad0efdec3a81e20bc58e385ea5d2b87b7 Mon Sep 17 00:00:00 2001
+From: Shawn O. Pearce <sop@google.com>
+Date: Fri, 12 Dec 2008 12:45:17 -0800
+Subject: [PATCH] make zero have a 3
+
+---
+ zero.bin | Bin 4096 -> 4096 bytes
+ 1 files changed, 0 insertions(+), 0 deletions(-)
+
+diff --git a/zero.bin b/zero.bin
+index 08e7df176454f3ee5eeda13efa0adaa54828dfd8..d70d8710b6d32ff844af0ee7c247e4b4b051867f 100644
+GIT binary patch
+delta 12
+TcmZorXi%6C%4ociaTPxR8IA+R
+
+delta 11
+ScmZorXi(Uguz-JJK>`37u>@iO
+
+--
+1.6.1.rc2.306.ge5d5e
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryLiteral.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryLiteral.patch
new file mode 100644
index 0000000..ab7b235
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_GitBinaryLiteral.patch
@@ -0,0 +1,135 @@
+From 8363f12135a7d0ff0b5fea7d5a35d294c0479518 Mon Sep 17 00:00:00 2001
+From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
+Date: Tue, 23 Sep 2008 22:19:19 +0200
+Subject: [PATCH] Push and fetch icons for the toolbar
+
+Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
+Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
+---
+ org.spearce.egit.ui/icons/toolbar/fetchd.png | Bin 0 -> 359 bytes
+ org.spearce.egit.ui/icons/toolbar/fetche.png | Bin 0 -> 393 bytes
+ org.spearce.egit.ui/icons/toolbar/pushd.png | Bin 0 -> 372 bytes
+ org.spearce.egit.ui/icons/toolbar/pushe.png | Bin 0 -> 404 bytes
+ org.spearce.egit.ui/plugin.xml | 32 ++++++++++++++-----------
+ 5 files changed, 18 insertions(+), 14 deletions(-)
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/fetchd.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/fetche.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/pushd.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/pushe.png
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetchd.png b/org.spearce.egit.ui/icons/toolbar/fetchd.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..4433c543f2a52b586a3ed5e31b138244107bc239
+GIT binary patch
+literal 359
+zcmV-t0hs=YP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0003lNkl<ZIE|%~
+zF{;8q6h+U7BBn4qm_`dxuy6}@!NzsCfLTKp;5yPsN=p|I(rKe&p~M74Bq5ObRRW{%
+zje4sYc=ybGk2gYV%`a+{hvjnl6{!Lo4hNJ{A44jDl#(C_K2BmJ09dV7A3>VW2}+n!
+zO1rKr0DRxqm&=7b&q>piUayDaIKlvw2}+e_&-3(PFkmzq(Q380-|r+zg6Da9KA(#Q
+zPa2QMl^Gz*GK3HmMPby1VQ9_(U^bf>W`H=3+3)uhMZxuY<#al++wJIfyXFi47K?>p
+z2GCj~rNp*vI-L&fb{osGh@!|$@ci;S2_arv_(sil1xb<+1Odb0kjLY}`F!ShJaW6;
+z>Lr*?r);;|7ihoV2SC*MjhoFzuh;A9KAB9aMXCk(Pk$Loi}X0uxcmSB002ovPDHLk
+FV1lxPoI3yj
+
+literal 0
+HcmV?d00001
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetche.png b/org.spearce.egit.ui/icons/toolbar/fetche.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..0ffeb419e6ab302caa5e58661854b33853dc43dc
+GIT binary patch
+literal 393
+zcmV;40e1e0P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0003{Nkl<ZIE|%}
+z%Su8~6o$WjJd|h&)kLg8qatclklHDbhzOh%4SI>*L3{^aqJcvRqCsRQ6~SndH7ExK
+zk=KcyE?#y6(aupYt$(ujUi|ChXYD1Vl>A3Z=W-tL|B2KE=%pm#uoxNA1!yxqxEMW&
+zB>{jQO^yT+ogtn_{8Ep$Aq3h-C?o|y>g-6?-!e46K4}{7I2X6^?w$w$wKqXWo#uE<
+zlN$@u$mIiCW0N$hIYc2#Jf_L5pe_`875HfeP>nhW1zLv1R!iSvNdTZ7`q(*62#YbV
+zQhB;#V#z_Hl;tD;jPm%3!!_Fv=xqj&EpW_lqPo^m>_wFE9KxQ3t1@8v1#@h(gk?2k
+zU%h_@BTD_vVB{6b=^Lij^3<ya#!DI7eU*yg9xg#(&qL<HX{n_QH=dOmU|OU>Dkk>j
+n^=YB|UiI3T3toz$0fY1nZ1068v8@+b00000NkvXXu0mjfWwNMg
+
+literal 0
+HcmV?d00001
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/pushd.png b/org.spearce.egit.ui/icons/toolbar/pushd.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..22c3f7bf17b8b5a931c7527d768af13607b03bce
+GIT binary patch
+literal 372
+zcmV-)0gL{LP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV0003yNkl<ZIE|%~
+zF{%PF6h%)&8w)Kgg)~~o6c%=-wG$iH;R0NP3veAG$Sh>A(?&%>K?5S92zkHxGyeyN
+zQSnxRymxZ%OQJ-CZ<LQ0VHnEcaNzNHaJ${8)oOIRUG)l}M1;v?B8^6aVzEe}P~dX8
+zV6A1h+tKg$Ga)&E`~8km3g?`+IiJs8M#ur2PA68Y70x-1$0OVAmgRCusZ@FoAR=h3
+zDVNJsDix~LD)oBZD;$r<sngD7(Utm(zh18y4u?;WOu&C>t%;)O$w?l-T1yl~1VO;{
+zdS$=gv)ODopU<8HfZ1#YAcMg`B@Q~B4vWRYJJDL}%|UCO8Yd6XZnu?)$aFeQidwCf
+z_mE--u|}hjN&o=H7-fukIg4hqnKXNVchu|kh_lCf`xbzwX88RJ-{>O;Y5D>6^@Sy#
+SDlMe|0000<MNUMnLSTZnn4{zX
+
+literal 0
+HcmV?d00001
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/pushe.png b/org.spearce.egit.ui/icons/toolbar/pushe.png
+new file mode 100644
+index 0000000000000000000000000000000000000000..1f99f0a702983d674f15eedae5f1218f0a30b5a0
+GIT binary patch
+literal 404
+zcmV;F0c-w=P)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00047Nkl<ZIE|%~
+z%Su8~6o$WjJO~|4C>w|sG%6%VHSk(UL<B+v4SI>*L41dvA&3Z?G>L*BB*n0rWDTl8
+zL8Pb?Jzc!)CSJ}#$rF8}#a?Uu`(JCbg_M&2pmu`H$+oP&=V*R^(bPY1%&ibu+ZV$G
+zgp`tt<A@B;jw3Z6E&C{q>NBF4=c=f%6i@vsq5!CR9fSfc-IT0lZ>^0`E2vbS?r{1v
+z8l^m+g%^~^H#FDePyq!%wm_SSqPmu`yJKk6QAXzdroz+R(7<gg074jZz1Vo3Dy2y#
+zMW2W=)MJ~7I|%3fPE-KBpis_UGqzZuUe(cG%h>L#RCJHY0YK_74TR+C&ZX!&h^>3c
+zJvdA^W^@l;f6eS*z&I*^D|{frVpE>&7273F76LY=;y1$BWF(Q0qALI}5jqkZAq&fh
+y^_oorR)}l`>CE22@+$y+&Cvb}|KU##2Jr)k?t0Dap2#Es0000<MNUMnLSTZgH?cGT
+
+literal 0
+HcmV?d00001
+
+diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
+index 7c98688..ee8a5a0 100644
+--- a/org.spearce.egit.ui/plugin.xml
++++ b/org.spearce.egit.ui/plugin.xml
+@@ -272,22 +272,26 @@
+ </separator>
+ </menu>
+ <action
+- class="org.spearce.egit.ui.internal.actions.FetchAction"
+- id="org.spearce.egit.ui.actionfetch"
+- label="%FetchAction_label"
+- style="push"
+- menubarPath="org.spearce.egit.ui.gitmenu/repo"
+- toolbarPath="org.spearce.egit.ui"
+- tooltip="%FetchAction_tooltip">
++ class="org.spearce.egit.ui.internal.actions.FetchAction"
++ disabledIcon="icons/toolbar/fetchd.png"
++ icon="icons/toolbar/fetche.png"
++ id="org.spearce.egit.ui.actionfetch"
++ label="%FetchAction_label"
++ menubarPath="org.spearce.egit.ui.gitmenu/repo"
++ style="push"
++ toolbarPath="org.spearce.egit.ui"
++ tooltip="%FetchAction_tooltip">
+ </action>
+ <action
+- class="org.spearce.egit.ui.internal.actions.PushAction"
+- id="org.spearce.egit.ui.actionpush"
+- label="%PushAction_label"
+- style="push"
+- menubarPath="org.spearce.egit.ui.gitmenu/repo"
+- toolbarPath="org.spearce.egit.ui"
+- tooltip="%PushAction_tooltip">
++ class="org.spearce.egit.ui.internal.actions.PushAction"
++ disabledIcon="icons/toolbar/pushd.png"
++ icon="icons/toolbar/pushe.png"
++ id="org.spearce.egit.ui.actionpush"
++ label="%PushAction_label"
++ menubarPath="org.spearce.egit.ui.gitmenu/repo"
++ style="push"
++ toolbarPath="org.spearce.egit.ui"
++ tooltip="%PushAction_tooltip">
+ </action>
+ <action
+ class="org.spearce.egit.ui.internal.actions.BranchAction"
+--
+1.6.1.rc2.306.ge5d5e
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_NoBinary.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_NoBinary.patch
new file mode 100644
index 0000000..684b13c
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_NoBinary.patch
@@ -0,0 +1,83 @@
+From 8363f12135a7d0ff0b5fea7d5a35d294c0479518 Mon Sep 17 00:00:00 2001
+From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
+Date: Tue, 23 Sep 2008 22:19:19 +0200
+Subject: [PATCH] Push and fetch icons for the toolbar
+
+Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
+Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
+---
+ org.spearce.egit.ui/icons/toolbar/fetchd.png | Bin 0 -> 359 bytes
+ org.spearce.egit.ui/icons/toolbar/fetche.png | Bin 0 -> 393 bytes
+ org.spearce.egit.ui/icons/toolbar/pushd.png | Bin 0 -> 372 bytes
+ org.spearce.egit.ui/icons/toolbar/pushe.png | Bin 0 -> 404 bytes
+ org.spearce.egit.ui/plugin.xml | 32 ++++++++++++++-----------
+ 5 files changed, 18 insertions(+), 14 deletions(-)
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/fetchd.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/fetche.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/pushd.png
+ create mode 100644 org.spearce.egit.ui/icons/toolbar/pushe.png
+
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetchd.png b/org.spearce.egit.ui/icons/toolbar/fetchd.png
+new file mode 100644
+index 0000000..4433c54
+Binary files /dev/null and b/org.spearce.egit.ui/icons/toolbar/fetchd.png differ
+diff --git a/org.spearce.egit.ui/icons/toolbar/fetche.png b/org.spearce.egit.ui/icons/toolbar/fetche.png
+new file mode 100644
+index 0000000..0ffeb41
+Binary files /dev/null and b/org.spearce.egit.ui/icons/toolbar/fetche.png differ
+diff --git a/org.spearce.egit.ui/icons/toolbar/pushd.png b/org.spearce.egit.ui/icons/toolbar/pushd.png
+new file mode 100644
+index 0000000..22c3f7b
+Binary files /dev/null and b/org.spearce.egit.ui/icons/toolbar/pushd.png differ
+diff --git a/org.spearce.egit.ui/icons/toolbar/pushe.png b/org.spearce.egit.ui/icons/toolbar/pushe.png
+new file mode 100644
+index 0000000..1f99f0a
+Binary files /dev/null and b/org.spearce.egit.ui/icons/toolbar/pushe.png differ
+diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
+index 7c98688..ee8a5a0 100644
+--- a/org.spearce.egit.ui/plugin.xml
++++ b/org.spearce.egit.ui/plugin.xml
+@@ -272,22 +272,26 @@
+ </separator>
+ </menu>
+ <action
+- class="org.spearce.egit.ui.internal.actions.FetchAction"
+- id="org.spearce.egit.ui.actionfetch"
+- label="%FetchAction_label"
+- style="push"
+- menubarPath="org.spearce.egit.ui.gitmenu/repo"
+- toolbarPath="org.spearce.egit.ui"
+- tooltip="%FetchAction_tooltip">
++ class="org.spearce.egit.ui.internal.actions.FetchAction"
++ disabledIcon="icons/toolbar/fetchd.png"
++ icon="icons/toolbar/fetche.png"
++ id="org.spearce.egit.ui.actionfetch"
++ label="%FetchAction_label"
++ menubarPath="org.spearce.egit.ui.gitmenu/repo"
++ style="push"
++ toolbarPath="org.spearce.egit.ui"
++ tooltip="%FetchAction_tooltip">
+ </action>
+ <action
+- class="org.spearce.egit.ui.internal.actions.PushAction"
+- id="org.spearce.egit.ui.actionpush"
+- label="%PushAction_label"
+- style="push"
+- menubarPath="org.spearce.egit.ui.gitmenu/repo"
+- toolbarPath="org.spearce.egit.ui"
+- tooltip="%PushAction_tooltip">
++ class="org.spearce.egit.ui.internal.actions.PushAction"
++ disabledIcon="icons/toolbar/pushd.png"
++ icon="icons/toolbar/pushe.png"
++ id="org.spearce.egit.ui.actionpush"
++ label="%PushAction_label"
++ menubarPath="org.spearce.egit.ui.gitmenu/repo"
++ style="push"
++ toolbarPath="org.spearce.egit.ui"
++ tooltip="%PushAction_tooltip">
+ </action>
+ <action
+ class="org.spearce.egit.ui.internal.actions.BranchAction"
+--
+1.6.1.rc2.306.ge5d5e
+
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_OneFileCc.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_OneFileCc.patch
new file mode 100644
index 0000000..c096b33
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/patch/testParse_OneFileCc.patch
@@ -0,0 +1,27 @@
+commit 1a56639bbea8e8cbfbe5da87746de97f9217ce9b
+Date: Tue May 13 00:43:56 2008 +0200
+ ...
+
+diff --cc org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
+index 169356b,dd8c317..fd85931
+mode 100644,100644..100755
+--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
++++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
+@@@ -55,12 -163,13 +163,15 @@@ public class UIText extends NLS
+
+ /** */
+ public static String ResourceHistory_toggleCommentWrap;
++
+ /** */
+ + public static String ResourceHistory_toggleCommentFill;
+ + /** */
+ public static String ResourceHistory_toggleRevDetail;
++
+ /** */
+ public static String ResourceHistory_toggleRevComment;
++
+ /** */
+ public static String ResourceHistory_toggleTooltips;
+
+
+commit 1a56639bbea8e8cbfbe5da87746de97f9217ce9b
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/all_packed_objects.txt b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/all_packed_objects.txt
new file mode 100644
index 0000000..a97f662
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/all_packed_objects.txt
@@ -0,0 +1,96 @@
+4b825dc642cb6eb9a060e54bf8d69288fbee4904 tree 0 9 7782
+540a36d136cf413e4b064c2b0e0a4db60f77feab commit 191 131 339
+5b6e7c66c276e7610d4a73c70ec1a1f7c1003259 blob 11 40 516 1 6ff87c4664981e4397625791c8ea3bbb5f2279a3
+6ff87c4664981e4397625791c8ea3bbb5f2279a3 blob 18787 7180 556
+82c6b885ff600be425b4ea96dee75dca255b69e7 commit 245 166 12
+902d5476fa249b7abc9d84c611577a81381f0327 tree 35 46 7736
+aabf2ffaec9b497f0950352b3e582d73035c2035 tree 35 46 470
+c59759f143fb1fe21c197981df75a7ee00290799 commit 240 161 178
+02ba32d3649e510002c21651936b7077aa75ffa9 tree 122 127 3806
+0966a434eb1a025db6b71485ab63a3bfbea520b6 commit 287 197 2611
+09efc7e59a839528ac7bda9fa020dc9101278680 tree 68 71 5497
+0a3d7772488b6b106fb62813c4d6d627918d9181 tree 98 95 3367
+1004d0d7ac26fbf63050a234c9b88a46075719d3 tree 68 72 3504
+10da5895682013006950e7da534b705252b03be6 blob 6 15 3591
+1203b03dc816ccbb67773f28b3c19318654b0bc8 commit 222 152 758
+15fae9e651043de0fd1deef588aa3fbf5a7a41c6 blob 6 15 3474
+16f9ec009e5568c435f473ba3a1df732d49ce8c3 blob 3 12 4196
+1fd7d579fb6ae3fe942dc09c2c783443d04cf21e blob 6 15 3678
+20a8ade77639491ea0bd667bf95de8abf3a434c8 tree 66 77 5663
+2675188fd86978d5bc4d7211698b2118ae3bf658 tree 68 72 4124
+2c349335b7f797072cf729c4f3bb0914ecb6dec9 commit 221 154 2457
+2cc3f4155a8eda5c3f1bc85de0988c0155c8cc1c tree 68 72 4717
+30a7b072d441dbfcfe0266b1c5fce94c22c447da tree 38 48 5784
+42e4e7c5e507e113ebbb7801b16b52cf867b7ce1 commit 184 133 1407
+49322bb17d3acc9146f98c97d078513228bbf3c0 commit 338 223 12
+49c5f851406e8004b816b8170f6f18e30ee877b9 tree 68 72 3606
+55a1a760df4b86a02094a904dfa511deb5655905 blob 6 15 3693
+58be4659bb571194ed4562d04b359d26216f526e commit 226 156 2962
+59706a11bde2b9899a278838ef20a97e8f8795d2 commit 222 153 1692
+5f25aaf573e7a094697987a927b833e088134674 tree 66 76 5184
+6020a3b8d5d636e549ccbd0c53e2764684bb3125 tree 122 126 3241
+62b15c9ddac853efbb00f59123f484b05b06d8b3 tree 28 37 4431
+6462e7d8024396b14d7651e2ec11e2bbf07a05c4 commit 221 153 1254
+6c83a9d0a09ce6d12292314ed3d9e1f60e39feb0 tree 66 76 5587
+6c8b137b1c652731597c89668f417b8695f28dd7 commit 172 123 3118
+6db9c2ebf75590eef973081736730a9ea169a0c4 commit 222 152 2153
+6e1475206e57110fcef4b92320436c1e9872a322 commit 282 192 566
+7f822839a2fe9760f386cbbbcb3f92c5fe81def7 commit 222 152 1540
+81e462df7c747d5b8783af18bf83bffbef8dc2bc tree 34 45 5139
+8230f48330e0055d9e0bc5a2a77718f6dd9324b8 blob 10 19 5568
+82b1d08466e9505f8666b778744f9a3471a70c81 blob 20 22 3708
+82fb2e7873759b74c41020a00abaea9c378a7a15 tree 66 76 4801
+835da11381dee94c71a04164cdaa533d0673e4e5 tree 34 45 4468
+83834a7afdaa1a1260568567f6ad90020389f664 commit 282 192 1062
+83d2f0431bcdc9c2fd2c17b828143be6ee4fbe80 commit 221 155 1998
+856ec208ae6cadac25a6d74f19b12bb27a24fe24 tree 66 76 5260
+86265c33b19b2be71bdd7b8cb95823f2743d03a8 tree 94 102 4208
+86cec6b57d80fda40300fb0d667965a5c3c3572f blob 6 15 3576
+8d6a2f2af0b2b96f320dd62fb6d9916fd2497dd9 tree 66 77 5420
+8f50ba15d49353813cc6e20298002c0d17b0a9ee tree 94 102 4961
+9188910f5d18434c2c8a3d78e8bef1a469c5626e tree 68 72 3933
+965361132e2f15897c9fd6c727beb5753057c38a blob 6 15 3489
+968a4b6caa8b55a68098e0495fbd9e75a7d05efa tree 68 72 4310
+a288d2cc3ee7d82f482e70ae7b6fedb4a039dd09 tree 28 37 4394
+a33a091b7c8de98b3a2ad2f21f88ea86f395d787 tree 94 102 4615
+a4e0e50de469ac6e2fdf2ee81808f253d5b78fd3 tree 68 72 5336
+ac7e7e44c1885efb472ad54a78327d66bfc4ecef commit 221 154 2808
+acd0220f06f7e4db50ea5ba242f0dfed297b27af tree 94 102 4513
+ae9304576a6ec3419b231b2b9c8e33a06f97f9fb blob 3 12 4382
+b9877f83f4c2ba0c3dd8fb2f6b5f04a0aaf18594 tree 66 76 5063
+bab66b48f836ed950c99134ef666436fb07a09a0 commit 222 152 910
+be9b45333b66013bde1c7314efc50fabd9b39c6d tree 7 18 4005 1 02ba32d3649e510002c21651936b7077aa75ffa9
+c070ad8c08840c8116da865b2d65593a6bb9cd2a commit 282 192 235
+c17b9ee9d0501fecadfac3b60ca485b14f5dbe98 tree 38 49 5832
+c1827f07e114c20547dc6a7296588870a4b5b62c blob 3 12 5408
+c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 blob 3 12 4949
+cd4bcfc27da62c6b840de700be1c60a7e69952a5 tree 66 76 3730
+d0114ab8ac326bab30e3a657a0397578c5a1af88 commit 84 95 427 1 c070ad8c08840c8116da865b2d65593a6bb9cd2a
+d31f5a60d406e831d056b8ac2538d515100c2df2 commit 221 153 1845
+d4b9b11fc8006af3b05cf2b4611077ed6a9b8c07 tree 68 72 4877
+d86a2aada2f5e7ccf6f11880bfb9ab404e8a8864 commit 222 152 2305
+da0f8ed91a8f2f0f067b3bdf26265d5ca48cf82c blob 3 12 3462
+e4ff0b72cb0994dbf7a9da260aeb461c9d882bb5 tree 34 44 5740
+e6bfff5c1d0f0ecd501552b43a1e13d8008abc31 blob 3 12 4789
+f2aacb9368806d6502a03aa9da0834d4b50b9f0e tree 94 101 4023
+f73b95671f326616d66b2afb3bdfcdbbce110b44 commit 33 44 522 2 d0114ab8ac326bab30e3a657a0397578c5a1af88
+17768080a2318cd89bba4c8b87834401e2095703 tag 140 132 12
+032c063ce34486359e3ee3d4f9e5c225b9e1a4c2 tag 152 138 12
+1170b77a48d3ea2d58b043648b1ec63d606e3efa tag 150 138 971
+214cae792433672d28b3aeb9f75c1ae84fd54628 tag 150 136 1109
+8dfd42699e7b10e568fa1eaebe249e33e98da81e tag 150 138 833
+a773cd2d9dbca00d08793dac0d7002a49f0428c0 tag 150 138 422
+bf5123bb77c7b5a379f7de9c1293558e3e24dfb8 tag 150 135 287
+d54e006ebbef94b7d3a5cd56d154f1e6f08efb94 tag 150 137 560
+dd144af286452bfd6a1ea02b0d3745bcdb555e9d tag 150 137 150
+efee904c794b943a06931c76c576dd552212e8bc tag 150 136 697
+8bbde7aacf771a9afb6992434f1ae413e010c6d8 tag 630 436 1187
+fd608fbe625a2b456d9f15c2b1dc41f252057dd7 blob 1512 1175 12
+06b8692d5c4f29a6bc4987e1bec04e9bb2ec54a2 tree 29 40 330
+164bf8c9e69a5c192acd28e95aefd9a5d6f254df blob 7 16 370
+175d5b80bd9768884d8fced02e9bd33488174396 commit 56 68 160 1 47d3697c3747e8184e0dc479ccbd01e359023577
+3d2770618bb1132e59c314dea328b83ac7c83232 tree 29 40 488
+3df983efd6acdf73dfc7b451a2e30f7ed42e7736 blob 5 14 528
+47d3697c3747e8184e0dc479ccbd01e359023577 commit 217 148 12
+5e28f2d1ee99ddf4595a7a1ff31efa1a107c11e7 tree 94 102 386
+737d98fe75742dd9a8f4bce5e176e7f8d99d9de3 tree 94 102 228
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/create-second-pack b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/create-second-pack
new file mode 100755
index 0000000..7241fa6
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/create-second-pack
@@ -0,0 +1,166 @@
+#!/bin/bash -ex
+
+export GIT_COMMITTER_NAME="A U Thor"
+export GIT_AUTHOR_NAME="A U Thor"
+export GIT_COMMITTER_EMAIL="a.u.thor@example.com"
+export GIT_AUTHOR_EMAIL="a.u.thor@example.com"
+
+test_tick () {
+ # from git/t/test-lib.sh
+ if test -z "${test_tick+set}"
+ then
+ test_tick=1112911993
+ else
+ test_tick=$(($test_tick + 60))
+ fi
+ GIT_COMMITTER_DATE="$test_tick -0700"
+ GIT_AUTHOR_DATE="$test_tick -0700"
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
+}
+
+git_commit () {
+ test_tick
+ git commit "$@"
+}
+
+git_merge () {
+ test_tick
+ git merge "$@"
+
+}
+
+test_tick
+rm -rf .git *.txt ?
+git init
+echo "On master" >>master.txt
+git add master.txt
+git_commit -a -m "On master"
+
+echo "On master" >>master.txt
+git_commit -a -m "On master again"
+
+git checkout -b a 6c8b137b1c652731597c89668f417b8695f28dd7
+mkdir a
+
+echo a1 >>a/a1.txt
+git add a/a1.txt
+git_commit -a -m "First a/a1"
+
+echo a2 >>a/a2.txt
+git add a/a2.txt
+git_commit -a -m "First a/a2"
+
+git merge master
+
+echo a1 >>a/a1.txt
+git add a/a1.txt
+git_commit -a -m "Second a/a1"
+git branch pa
+
+echo a2 >>a/a2.txt
+git add a/a2.txt
+git_commit -a -m "Second a/a2"
+
+git checkout -b b 58be4659bb571194ed4562d04b359d26216f526e
+
+mkdir b
+echo b1 >>b/b1.txt
+git add b/b1.txt
+git_commit -a -m "First b/b1"
+
+echo b2 >>b/b2.txt
+git add b/b2.txt
+git_commit -a -m "First b/b2"
+
+git merge a
+
+echo b1 >>b/b1.txt
+git add b/b1.txt
+git_commit -a -m "Second b/b1"
+
+echo b2 >>b/b2.txt
+git add b/b2.txt
+git_commit -a -m "Second b/b2"
+
+rm -rf a b c master.txt
+mkdir c
+rm -f ./git/index
+echo ref: refs/heads/c >.git/HEAD
+
+echo c1 >>c/c1.txt
+git add c/c1.txt
+git_commit -a -m "First c/c1, no parent"
+
+echo c2 >>c/c2.txt
+git add c/c2.txt
+git_commit -a -m "First c/c2"
+
+git_merge a
+
+echo c1 >>c/c1.txt
+git add c/c2.txt
+git_commit -a -m "Second c/c1"
+
+echo c2 >>c/c2.txt
+git add c/c2.txt
+git_commit -a -m "Second c/c2"
+
+git_merge b
+
+git checkout -b d a
+
+echo "a1" >>a/a1
+git add a/a1
+git_commit -a -m "Third a/a1"
+
+git checkout -b e a
+
+echo "a1" >>a/a1
+git add a/a1
+git_commit -a -m "Fourth a/a1"
+
+git checkout master
+
+git_merge c d e
+
+git repack -d
+
+git tag A a
+git tag -a -m "An annotated tag" B a^
+
+git repack -d
+
+Bnth=B
+for nth in 2nd 3rd 4th 5th 6th 7th 8th 9th 10th; do
+ git tag -a -m "An $nth level annotated tag" "B$nth" "$Bnth"
+ Bnth="B$nth"
+done
+
+git repack -d
+
+git checkout -b f a
+mkdir f
+echo "an eff" >f/f
+git add f/f
+git commit -m "An eff"
+git checkout -b g a
+mkdir f
+echo "an F" >f/f
+git add f/f
+git commit -m "An F"
+
+git repack -d
+
+git checkout -b symlink master
+ln -s c/c1.txt symlink.txt
+git add symlink.txt
+git_commit -m "A symlink"
+
+git checkout -b gitlink master
+git submodule add "$(pwd)/.git" submodule
+git_commit -m "A gitlink"
+
+git repack -d
+git pack-refs --all
+
+gitk --all master
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index
new file mode 100644
index 0000000..215da64
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index
Binary files differ
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.lsfiles b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.lsfiles
new file mode 100644
index 0000000..27fe5c2
--- /dev/null
+++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.lsfiles
@@ -0,0 +1,1437 @@
+100644 6b9c715d21d5486e59083fb6071566aa6ecd4d42 0 .gitattributes
+100644 a213e8e25bb2442326e86cbfb9ef56319f482869 0 .gitignore
+100644 373476bdc03f718b4c01471dd9996ee4497f43a8 0 .mailmap
+100644 9651afc89d5e789abd9cedaa4f3b92dde7dd1412 0 .project
+100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0 COPYING
+100644 ddb030137d54ef3fb0ee01d973ec5cee4bb2b2b3 0 Documentation/.gitattributes
+100644 d8edd904065fbc4bd06365ce378f57d4cd8f9f0d 0 Documentation/.gitignore
+100644 f628c1f3b7b706f9d585b96041e5a4b12bc0f62c 0 Documentation/CodingGuidelines
+100644 62269e39c4edf95b2cf2e6a60bff2a33b239b07e 0 Documentation/Makefile
+100644 fea3f9935b7794ce86f04d22c9d68fb9d537167d 0 Documentation/RelNotes-1.5.0.1.txt
+100644 b061e50ff05b5e13211bb315e240974e898de32c 0 Documentation/RelNotes-1.5.0.2.txt
+100644 cd500f96bfd73e288577b05cfdfe337d7f2b85bb 0 Documentation/RelNotes-1.5.0.3.txt
+100644 feefa5dfd4eee5f493fcf3091ec0de116d414fc1 0 Documentation/RelNotes-1.5.0.4.txt
+100644 eeec3d73d01a0e9f61df666bad8a48a4f423438a 0 Documentation/RelNotes-1.5.0.5.txt
+100644 c02015ad5fdb1953ad1a8cf5b0edd7ef7c04fbac 0 Documentation/RelNotes-1.5.0.6.txt
+100644 670ad32b85678c938709b47c37d6caacbb5ebe29 0 Documentation/RelNotes-1.5.0.7.txt
+100644 daf4bdb0d7bb24319810fe0e73aa317663448c93 0 Documentation/RelNotes-1.5.0.txt
+100644 91471213bdec8d95209db256f594b0e1b3f3ec2a 0 Documentation/RelNotes-1.5.1.1.txt
+100644 d88456306c503d9e604ffbb699fb7cadacb2e733 0 Documentation/RelNotes-1.5.1.2.txt
+100644 876408b65a0e0841567a2c9b97c6f6e62cb86b81 0 Documentation/RelNotes-1.5.1.3.txt
+100644 df2f66ccb5d2a6a038d1fcf9306e7ed7aae05f39 0 Documentation/RelNotes-1.5.1.4.txt
+100644 b0ab8eb371ccb05346781e63c5ec4b71dab8be34 0 Documentation/RelNotes-1.5.1.5.txt
+100644 55f3ac13e3c242acc4bb1b873272d7d8ff4ef84d 0 Documentation/RelNotes-1.5.1.6.txt
+100644 daed3672709f6b94478fc6ad425897abe3433c9a 0 Documentation/RelNotes-1.5.1.txt
+100644 ebf20e22a74284f7085a5027f588ba295fb767d0 0 Documentation/RelNotes-1.5.2.1.txt
+100644 f6393f8a94f454f4f7b5cc5bb42881b6662cadff 0 Documentation/RelNotes-1.5.2.2.txt
+100644 addb22955b4e4e5344f7f139076a798cb50024ff 0 Documentation/RelNotes-1.5.2.3.txt
+100644 75cff475f6546402dc3486c43e0b6e7557ae621e 0 Documentation/RelNotes-1.5.2.4.txt
+100644 e8281c72a0b997e90cba2c9a2c4153f8607a7b76 0 Documentation/RelNotes-1.5.2.5.txt
+100644 6195715dc78a26ce9ac452bd64852455fb79137c 0 Documentation/RelNotes-1.5.2.txt
+100644 7ff546c743b3ac2e75610473e496d93e44a6dbe9 0 Documentation/RelNotes-1.5.3.1.txt
+100644 4bbde3cab4dc6dc0815aeae5a0a79f88ab784b23 0 Documentation/RelNotes-1.5.3.2.txt
+100644 d2138469511d3dc111d81b9354f100ed344d9524 0 Documentation/RelNotes-1.5.3.3.txt
+100644 b04b3a45a5629cf852c970ac995bfb80bde846d2 0 Documentation/RelNotes-1.5.3.4.txt
+100644 7ff1d5d0d100fc632208f4cbb67189ecbf58e9a4 0 Documentation/RelNotes-1.5.3.5.txt
+100644 069a2b2cf9e9f28a2f9e6dc0817723a38b25f475 0 Documentation/RelNotes-1.5.3.6.txt
+100644 2f690616c8327f8c86477998358ee0dd17ee467f 0 Documentation/RelNotes-1.5.3.7.txt
+100644 0e3ff58a46f3cc2b987f9c3216e4844bab2317a5 0 Documentation/RelNotes-1.5.3.8.txt
+100644 d03894b92645f2dd0d7cb464d3ab1905d8cb62ed 0 Documentation/RelNotes-1.5.3.txt
+100644 d4e44b8b09d7176c137d826d5de305bd6822e862 0 Documentation/RelNotes-1.5.4.1.txt
+100644 21d0df59fbb08ab148e275e21f0ed182c5aab1a1 0 Documentation/RelNotes-1.5.4.2.txt
+100644 b0fc67fb2ade1c7e318d309ee4d55d37964021f3 0 Documentation/RelNotes-1.5.4.3.txt
+100644 89fa6d03bc038d6210e94d7fe9fbbffdbc84d883 0 Documentation/RelNotes-1.5.4.4.txt
+100644 02823413987d5a10364d936327e3a1cfb38cbac2 0 Documentation/RelNotes-1.5.4.5.txt
+100644 3e3c3e55a31fd7f6d51e1aa5a1d57532484dacaf 0 Documentation/RelNotes-1.5.4.6.txt
+100644 f1323b61746ee5d7f2a9d2fc3835c2cd75e76434 0 Documentation/RelNotes-1.5.4.txt
+100644 7de419708f77fff6f61e749b917b5fcecbe9a292 0 Documentation/RelNotes-1.5.5.1.txt
+100644 391a7b02eaf32d930e7c9c274dfd2a2edf081f75 0 Documentation/RelNotes-1.5.5.2.txt
+100644 f22f98b734f82101d47a6aa2453d5374d5dd8175 0 Documentation/RelNotes-1.5.5.3.txt
+100644 2d0279ecce622aab935e8e25914a5bd132fa95f3 0 Documentation/RelNotes-1.5.5.4.txt
+100644 30fa3615c77d6198a5a08ebd8e8c63f4cd21b295 0 Documentation/RelNotes-1.5.5.5.txt
+100644 29322124881bf65c3ee6f5d613251b09f4a98d9a 0 Documentation/RelNotes-1.5.5.txt
+100644 4864b16445f3ca1854cee608f7c15f5a6e0933d8 0 Documentation/RelNotes-1.5.6.1.txt
+100644 5902a85a78610ec38f4cf160ccd3c01267b4f9a1 0 Documentation/RelNotes-1.5.6.2.txt
+100644 942611299d59abd4bdd820e1258662067a304d62 0 Documentation/RelNotes-1.5.6.3.txt
+100644 d8968f1ecbd930463858870ee872efd8cb672bab 0 Documentation/RelNotes-1.5.6.4.txt
+100644 e143d8d61be1bb2fac024b5d5f270b33f4f898d4 0 Documentation/RelNotes-1.5.6.txt
+100644 2542cf53d2e40b06afe918fcf1cd35de19126d9e 0 Documentation/RelNotes-1.6.0.txt
+100644 841bead9db18a025638570c10cac72bcf4791f68 0 Documentation/SubmittingPatches
+100644 40d43b78ee9d6c3827bcf631c1f41f54d0e3dfbc 0 Documentation/asciidoc.conf
+100644 5428111d732cb38dbb257ddfa860ebd04088b4e9 0 Documentation/blame-options.txt
+100755 ba4205e0302a267a5da6bef504f3e69eb0c4aa6d 0 Documentation/build-docdep.perl
+100644 6a361a21367bfed4ae325049556f2e82e7e1dbe4 0 Documentation/callouts.xsl
+100755 dbc133cd3c1f19dd507014477e68b8ada78eab5e 0 Documentation/cat-texi.perl
+100755 04f99778d81def42e9e129b2f5b2b0551a0c760f 0 Documentation/cmd-list.perl
+100644 61c376057c0f2b9510bf6f1b2beb42f9859b7f46 0 Documentation/config.txt
+100644 400cbb3b1c120b93278472678ee7bdb87a74f95b 0 Documentation/diff-format.txt
+100644 517e1eba3c56907ebcb1d478dceb184e53fceda4 0 Documentation/diff-generate-patch.txt
+100644 cba90fd27c6a1baaca884328e96adc8a6da8fc36 0 Documentation/diff-options.txt
+100644 b878b385c6967f4c64ba30bdfe8f9bd24bef91e3 0 Documentation/docbook-xsl.css
+100644 9a6912c641edf52083b8996fdce3a0be2f4dba45 0 Documentation/docbook.xsl
+100644 e598cdda45cf0b953a106d6786765b3316e2cc16 0 Documentation/everyday.txt
+100644 d313795fdbc420e3395adc42aebe82fabda037d4 0 Documentation/fetch-options.txt
+100755 ff7d78f620a35fb66c47e50c4eceecff00b643b3 0 Documentation/fix-texi.perl
+100644 2b6d6c86547b2cec370d34b14ddef25264404892 0 Documentation/git-add.txt
+100644 c45c53ec2404725394563a9fba40f31cd314adb2 0 Documentation/git-am.txt
+100644 8b6b56a54409dd586047a1a6cdf1138e8bb0e77b 0 Documentation/git-annotate.txt
+100644 feb51f124ac8a806e65d41f6274c58de64d2991f 0 Documentation/git-apply.txt
+100644 c7a6e3ec050b7ceeec79d468b5ffa123314c8f5d 0 Documentation/git-archimport.txt
+100644 41cbf9c0819872a322321455b8a5cb805efcc26b 0 Documentation/git-archive.txt
+100644 c7981efcd9b86287bbea9ddcaf187a9bd48c77eb 0 Documentation/git-bisect.txt
+100644 fba374d652723161c3683d1be98c08ba573057cc 0 Documentation/git-blame.txt
+100644 6103d62fe3dca23c78b16dbdbb5ba231a6b39bf7 0 Documentation/git-branch.txt
+100644 1b66ab743c64d980a43a028d57ca2f6505d97845 0 Documentation/git-bundle.txt
+100644 d35e8a04fe28b095b5405ae2e0b09e3ab448bf63 0 Documentation/git-cat-file.txt
+100644 2b821f2a1d70fa108ce279135fd5028453a04fd9 0 Documentation/git-check-attr.txt
+100644 034223cc5ace81dd0b63da44d79db5e83a1d492a 0 Documentation/git-check-ref-format.txt
+100644 62d84836b8a0d77c2a6ea534566ff8462b0eb37a 0 Documentation/git-checkout-index.txt
+100644 5aa69c0e12a6756fd6f79c117008a373f65ba5f5 0 Documentation/git-checkout.txt
+100644 837fb08b7971a8b948dd7d039bab4a3c2e54cac7 0 Documentation/git-cherry-pick.txt
+100644 74d14c4e7fc88e702e4781b22eb8ed5ce0480c6f 0 Documentation/git-cherry.txt
+100644 670cb02b6cc035e4fbcf1a1016f66b7a85cd4ef7 0 Documentation/git-citool.txt
+100644 7dcc1ba58c3879cb14ce243a4af00bca9e850799 0 Documentation/git-clean.txt
+100644 26fd1b111798461b9150f1416721aa460f1ea525 0 Documentation/git-clone.txt
+100644 feec58400b64c65c8f96f2d1834016455c89829e 0 Documentation/git-commit-tree.txt
+100644 0e25bb862704eee4a22fe5349c04823d14ea9cba 0 Documentation/git-commit.txt
+100644 28e1861094a1689cdb042df6b1d788620ffdf213 0 Documentation/git-config.txt
+100644 75a8da1ca906aee4cc6a7d0c3ff19862b8e0fc2f 0 Documentation/git-count-objects.txt
+100644 2da8588f4fd6edb842a9824181165b3f043ec87b 0 Documentation/git-cvsexportcommit.txt
+100644 b7a8c10b8709108c1c8a0d14f661c179c2b4f22c 0 Documentation/git-cvsimport.txt
+100644 c2d3c90d27084e7de7e0f7c37b40f130f6960244 0 Documentation/git-cvsserver.txt
+100644 4ba4b75c1126d87c48935e7697e05f0d5210ad2d 0 Documentation/git-daemon.txt
+100644 7fdda04bae34790eb2345427dda746e8bf097c1a 0 Documentation/git-describe.txt
+100644 5c8c1d95a89b15e936816f486a8114cbc6788fb9 0 Documentation/git-diff-files.txt
+100644 26920d4f63cd213ff17ab28d8dd0dbea94482147 0 Documentation/git-diff-index.txt
+100644 8c8f35b7a762d42d3c45ff9f4eee1cb32d3917b6 0 Documentation/git-diff-tree.txt
+100644 c53eba557d0a242a0d8553d9569ce8b2eb86331b 0 Documentation/git-diff.txt
+100644 b974e2115b01f17f0ac809b691baf2f4e4d32169 0 Documentation/git-fast-export.txt
+100644 c2f483a8d2aed8dc017f3172e2d5fff4bed2c450 0 Documentation/git-fast-import.txt
+100644 47448da22eeebf51fe5829717df2dc7129a9b17e 0 Documentation/git-fetch-pack.txt
+100644 d3164c5c88db6b9e02a4186c398e19c425bc204b 0 Documentation/git-fetch.txt
+100644 7ba9dab5e6c0b32f927d24de800e17b71a06b84b 0 Documentation/git-filter-branch.txt
+100644 1c24796d66d5aeaeeccfd152c69cddba1953fd6c 0 Documentation/git-fmt-merge-msg.txt
+100644 727d84e6735417baa82fe7abff5b6945f6d6cef4 0 Documentation/git-for-each-ref.txt
+100644 010d9e432231f41a179023df2e85610583b572cf 0 Documentation/git-format-patch.txt
+100644 965a8279c1b17df6fbf82f4fbcadbd254049a7d5 0 Documentation/git-fsck-objects.txt
+100644 d5a76472196a5e67bc6e62411d90377ec3b46e3a 0 Documentation/git-fsck.txt
+100644 7086eea74a38b036130f61db362bae209a065e47 0 Documentation/git-gc.txt
+100644 84f23ee525336fc2bdd289991b97eafecddc14b2 0 Documentation/git-get-tar-commit-id.txt
+100644 fa4d133c1bccc088d3c8da65bce4e15cafd394aa 0 Documentation/git-grep.txt
+100644 0e650f497bd456e633334a91bd929053a08eb0d3 0 Documentation/git-gui.txt
+100644 ac928e198e75595a6fcd4e83b89aaf68987bd420 0 Documentation/git-hash-object.txt
+100644 f414583fc48e85e4785fbf5f9431bb81a96ccd9d 0 Documentation/git-help.txt
+100644 e7c796155fdd0ad644decf5dc488c6d780a2d164 0 Documentation/git-http-fetch.txt
+100644 aef383e0b142bd603b77620cad720c102d70c4b7 0 Documentation/git-http-push.txt
+100644 b3d8da33ee64730794821440c287f30c4bb85789 0 Documentation/git-imap-send.txt
+100644 4b5c743c1e5f11281e2b9df7508d57e9878ee5d2 0 Documentation/git-index-pack.txt
+100644 1fd0ff2610a1375bcf0defe2a234b2dee1a7997a 0 Documentation/git-init-db.txt
+100644 71749c09d309f4cae2da9788969359d2620224a9 0 Documentation/git-init.txt
+100644 22da21a54f625c434216945889127ec283d3d09f 0 Documentation/git-instaweb.txt
+100644 05cbac56aced6ad27f36fe63f8f536e794794f9f 0 Documentation/git-log.txt
+100644 602b8d5d4de8f7649cb88e6622108c012f484933 0 Documentation/git-lost-found.txt
+100644 9f85d60b5fb6d6ae1b4d8c2e65a6131cbe21450b 0 Documentation/git-ls-files.txt
+100644 abe7bf9ff9eb9a3ddb1924938de071291520797a 0 Documentation/git-ls-remote.txt
+100644 4c7262f1cd82ca8d9ea6be638d23b18d9bba3738 0 Documentation/git-ls-tree.txt
+100644 31eccea5bc0697ee461503734942429c2133ef3f 0 Documentation/git-mailinfo.txt
+100644 5cc94ec53daf3057f57c993983d659543962abec 0 Documentation/git-mailsplit.txt
+100644 1a7ecbf8f39381b0c7b2da513dfa26eacec15cf6 0 Documentation/git-merge-base.txt
+100644 024ec015a3a3e0d3677a82e082e72a36c4572827 0 Documentation/git-merge-file.txt
+100644 ff088c5c294527dd97c542012483aafe3ca64314 0 Documentation/git-merge-index.txt
+100644 dc8a96adb00c0b674e12e071a4a56f89bfe8583d 0 Documentation/git-merge-one-file.txt
+100644 dbb0c18668ff0fb60c31c12b02c27d92b430c24a 0 Documentation/git-merge-tree.txt
+100644 2db88809898592c691166427efdd106d844d42d9 0 Documentation/git-merge.txt
+100644 31570b1e27af6a603df98868c627da08d91c17cc 0 Documentation/git-mergetool.txt
+100644 8bcc11443dce7322ac5b0fa70e07b2465f762615 0 Documentation/git-mktag.txt
+100644 af19f06ed738bdecc7ab9a72a5c9a216b816f4c2 0 Documentation/git-mktree.txt
+100644 9c5660275b326661bf7dc9a5162e5177b8a62b0f 0 Documentation/git-mv.txt
+100644 6e77ab135353aaf713b638a70701717db1706c2c 0 Documentation/git-name-rev.txt
+100644 8c354bd47014825de71243d73158b6b080ecb350 0 Documentation/git-pack-objects.txt
+100644 5f9435e59b49fec1e37c65f1bfdc38be3704c4e5 0 Documentation/git-pack-redundant.txt
+100644 a5244d35f49f10b7954d8fa52164663e3d167d4b 0 Documentation/git-pack-refs.txt
+100644 cd43069874d59504627211e011250a3554aeee5a 0 Documentation/git-parse-remote.txt
+100644 477785e13418e1971156f5210015da4ab9d77cab 0 Documentation/git-patch-id.txt
+100644 8282a5e82b6e897ac501ef05c982d5e69415363f 0 Documentation/git-peek-remote.txt
+100644 b5f26cee132622185457d92522fb932302dec97d 0 Documentation/git-prune-packed.txt
+100644 54f1dab38de9e01d8452753ac6028875b91d5f6b 0 Documentation/git-prune.txt
+100644 7578623edba9e2ddc5232f1a981bcb297182638d 0 Documentation/git-pull.txt
+100644 050c3ddae2732fdf4cb9f3b0f798e3d2d190fa4e 0 Documentation/git-push.txt
+100644 d4037de5124010e9c90dcc97e8b64e6011dbed21 0 Documentation/git-quiltimport.txt
+100644 6f4b9b017f7b504a2b9e909639a61b1ef7750af0 0 Documentation/git-read-tree.txt
+100644 59c1b021a6c410e1097df21d6d47365aec6689e2 0 Documentation/git-rebase.txt
+100644 6b2f8c4de7c32927f270e561362d4766193986fa 0 Documentation/git-receive-pack.txt
+100644 d99236e14d5238c936304029bd48efc6ac9dd024 0 Documentation/git-reflog.txt
+100644 25ff8f9dcbe0db52675338f1429e9169052b9cf1 0 Documentation/git-relink.txt
+100644 bb99810ec76f93ff1cdc59aacdf592c64419701a 0 Documentation/git-remote.txt
+100644 38ac60947bc6c4cbfc8aae70a92f9163fefed442 0 Documentation/git-repack.txt
+100644 e5bdb5533e61687874ad36d30534b2ac9e58d7cb 0 Documentation/git-repo-config.txt
+100644 19335fddae2b706cd785258a8c02a5595c525667 0 Documentation/git-request-pull.txt
+100644 89f321b414212a555f1e0fb0ff0ce6f4c180fd06 0 Documentation/git-rerere.txt
+100644 6abaeac28cb70bcff809c803d732f79630c8046f 0 Documentation/git-reset.txt
+100644 fd1de92e34b459cdc89928e1561ee6934cd63c19 0 Documentation/git-rev-list.txt
+100644 2921da320d2b84df4d15ec2745e6d94093dd6907 0 Documentation/git-rev-parse.txt
+100644 98cfa3c0d0f27e0cb603f07c76285f85ef07a771 0 Documentation/git-revert.txt
+100644 4d0c495bc3ecb5482165a46956efe73dfdc5ee72 0 Documentation/git-rm.txt
+100644 afbb294a7faadc7ff6d4039246dc1c085575cd4f 0 Documentation/git-send-email.txt
+100644 399821832c2a5cd6a718a7dc37a87e6b5bc0b213 0 Documentation/git-send-pack.txt
+100644 18f14b5be89b4e0240f59b13313308f3c09d012c 0 Documentation/git-sh-setup.txt
+100644 ff420f8f8c52eb598976a134916000da9b8f3976 0 Documentation/git-shell.txt
+100644 7ccf31ccc401fd35a0ed65667be001805436249b 0 Documentation/git-shortlog.txt
+100644 d3f258869f5d441bea16b46d8030eb64ecb7df99 0 Documentation/git-show-branch.txt
+100644 e3285aacfd310cc269cdb03aa9243c939c24def7 0 Documentation/git-show-index.txt
+100644 9a4389981ca067633d773e28393a1d72ac6552ae 0 Documentation/git-show-ref.txt
+100644 1642cfd8236a5b57420f67da580b42066afaa4f6 0 Documentation/git-show.txt
+100644 7d50d74cc9a945f0dd82b0c26509bf0392eff837 0 Documentation/git-stash.txt
+100644 84f60f3407499c40a8e0caadf9d40ed5e9b8386b 0 Documentation/git-status.txt
+100644 7508c0e42d2cd50ac522fc80a3a866411b7b51c5 0 Documentation/git-stripspace.txt
+100644 35efeefb3056ac69cf02689dc338956340e9efc9 0 Documentation/git-submodule.txt
+100644 f230125a81baab9f13bf84e3543b63fc77a8e827 0 Documentation/git-svn.txt
+100644 210fde03a12cd757769f81754e789a2a5934f02c 0 Documentation/git-symbolic-ref.txt
+100644 046ab3542bab4048fe07c8a6718d63f9cd9e3791 0 Documentation/git-tag.txt
+100644 a5d9558dd1eabd71e838026721d707c5f1ecc369 0 Documentation/git-tar-tree.txt
+100644 a96403cb8cb720dbf094b06a0dc0b430147298fc 0 Documentation/git-tools.txt
+100644 995db9feadf68df6f22de745d90790a145128e44 0 Documentation/git-unpack-file.txt
+100644 36d1038056101a459a33e32b6729d75e03f127ce 0 Documentation/git-unpack-objects.txt
+100644 1d9d81a702d26706047ae6ea29b4ca62ebe59460 0 Documentation/git-update-index.txt
+100644 9639f705afafab6fcf0cd21ad2693627ab42f66d 0 Documentation/git-update-ref.txt
+100644 35d27b0c7f0e4b7a1d0851140958e71fabb0e6bc 0 Documentation/git-update-server-info.txt
+100644 bbd7617587084b0c66fd8e0b9f623cac50be2c03 0 Documentation/git-upload-archive.txt
+100644 b8e49dce4a19a4d7083459468f27c273c1d91fea 0 Documentation/git-upload-pack.txt
+100644 3647dd6c8f9c74a688f7a143119386ba89a8f13d 0 Documentation/git-var.txt
+100644 c8611632d1d501d57eb7000de0ec3c3b36810b80 0 Documentation/git-verify-pack.txt
+100644 ba837df4bc66e2b828fcd49c94f35957c27322df 0 Documentation/git-verify-tag.txt
+100644 36afad8d4e0d67a8d9dd33d3bc590789e9f6604d 0 Documentation/git-web--browse.txt
+100644 cadfbd90403766d44598c8d96d89dc5a0e4e2ef8 0 Documentation/git-whatchanged.txt
+100644 26d3850e7317c22dcf0999e0c4a6afe9a5ea2e03 0 Documentation/git-write-tree.txt
+100644 44ea35e949dbbc0e5785ba2831072059881058f8 0 Documentation/git.txt
+100644 d7b41142d2c843bc5460f03c73c609b1c53ff4a6 0 Documentation/gitattributes.txt
+100644 29e5929db22257346a2bed16cbd5ca6531698676 0 Documentation/gitcli.txt
+100644 49179b0a00fad1ecda1fdf0537ccbce77f5fc494 0 Documentation/gitcore-tutorial.txt
+100644 aaa7ef737a4c190c60e37e2849ce42f3bdb5dda7 0 Documentation/gitcvs-migration.txt
+100644 2bdbc3d4f6a97c1a1d970f0c5f27222ef9e31274 0 Documentation/gitdiffcore.txt
+100644 565719ed5f8516e17229ec11bbec5e1354580397 0 Documentation/gitglossary.txt
+100644 046a2a7fe7cf8ec301d3a20f7ebc587a09d210e3 0 Documentation/githooks.txt
+100644 59321a2e82b1e141746d94c439452b52b84994ad 0 Documentation/gitignore.txt
+100644 e02ecf57444df14d61d82dcf2f9e0c3f6b990b91 0 Documentation/gitk.txt
+100644 f8d122a8b90ca7cb4920768ca23fd9a27574ffdf 0 Documentation/gitmodules.txt
+100644 a969b3fbc3efc99ce490455b93c8bfb912994e2e 0 Documentation/gitrepository-layout.txt
+100644 660904686c656fd00078aa272d0b9a5a198e1833 0 Documentation/gittutorial-2.txt
+100644 48d1454a90cf9453e5e3c9fa01b3dbc369a58f1f 0 Documentation/gittutorial.txt
+100644 9b4a4f45e900a96c4ddeb214816877f39cca15a5 0 Documentation/glossary-content.txt
+100755 34aa30c5b9ffc617e1519878317c2ae83bed6a6a 0 Documentation/howto-index.sh
+100644 4357e269131fad960367534ae4161fe078fee30a 0 Documentation/howto/maintain-git.txt
+100644 554909fe08de380aa02f2bf37f0f3b43b0233f4b 0 Documentation/howto/rebase-and-edit.txt
+100644 d214d4bf9d0e539c6bf58ba24dcd12aabbaea1d8 0 Documentation/howto/rebase-from-internal-branch.txt
+100644 48c67568d3418b2d6608f362f4b76e02ec450abc 0 Documentation/howto/rebuild-from-update-hook.txt
+100644 323b513ed0e0ce8b749672f589a375073a050b97 0 Documentation/howto/recover-corrupted-blob-object.txt
+100644 e70d8a31e7b05e8efc70c6a56f476324065d57a6 0 Documentation/howto/revert-branch-rebase.txt
+100644 6d3eb8ed00e1779efce8abe201d37c8cff07ec29 0 Documentation/howto/separating-topic-branches.txt
+100644 40327486084ac02874faff70fd100b619af83214 0 Documentation/howto/setup-git-server-over-http.txt
+100644 697d9188850e9a685045da5bd37844b02978752d 0 Documentation/howto/update-hook-example.txt
+100644 4e2f75cb6167633c97ec1981d2b6659368cc0170 0 Documentation/howto/use-git-daemon.txt
+100644 0953a50b693307976977c81a4c0b611fd5dfb490 0 Documentation/howto/using-merge-subtree.txt
+100644 fb0d7da56b902217f8f1f4d4bc85186d6bf0dc4c 0 Documentation/i18n.txt
+100755 35f440876ed182de319b6d3f0b8296b1a1ede29d 0 Documentation/install-doc-quick.sh
+100755 2135a8ee1f4f56a8c799437949ba76d7526164c0 0 Documentation/install-webdoc.sh
+100644 4065a3a27a38be73132b9f509e1d63546b3fddef 0 Documentation/manpage-1.72.xsl
+100644 48ce747cf4dad592d642735856eb156e93d6cf30 0 Documentation/merge-config.txt
+100644 007909a82fe77325e46c54799d00dc78493a47f9 0 Documentation/merge-options.txt
+100644 1276f858ade29bec40716d19cf56fe6e3882fc25 0 Documentation/merge-strategies.txt
+100644 c11d4957714db202a012209e2437b9e050a28ae0 0 Documentation/pretty-formats.txt
+100644 6d66c74cc11e6622892061f8328d04dfe38f87bf 0 Documentation/pretty-options.txt
+100644 00a8d210476089257be3d09ac8a16d1f8e1dd8dc 0 Documentation/pull-fetch-param.txt
+100644 3aa38097e6350a02c50873d5c670e108003fab22 0 Documentation/rev-list-options.txt
+100644 8aa891daee050f03cf265a6ea991ff9ebb60815e 0 Documentation/technical/.gitignore
+100644 43dbe09f735525b0a1549ccfb4de2f2ca87252a0 0 Documentation/technical/api-allocation-growing.txt
+100644 7ede1e64e5d40ec8f742e900d7273d6f961605e2 0 Documentation/technical/api-builtin.txt
+100644 1d52a6ce14416c7308f6c2c5d6a3dd2a43184e91 0 Documentation/technical/api-decorate.txt
+100644 20b0241d30026747391fa4b6b38de5cf959cee70 0 Documentation/technical/api-diff.txt
+100644 5bbd18f0206604416c3833b7541a5b55b7e63976 0 Documentation/technical/api-directory-listing.txt
+100644 9d97eaa9dee99eef7e66072c4c51cfff3000bba3 0 Documentation/technical/api-gitattributes.txt
+100644 a69cc8964d585db41b1907a8ce7cb8d0a9511ef2 0 Documentation/technical/api-grep.txt
+100644 c784d3edcb2537b84bfb5db3da55faaf45995155 0 Documentation/technical/api-hash.txt
+100644 e9559790a32185b1d4ac8ae72881f4f63f082538 0 Documentation/technical/api-history-graph.txt
+100644 adbdbf5d75d8e17e38e1ba0e3694b4ff210f5799 0 Documentation/technical/api-in-core-index.txt
+100644 af7cc2e395f1399830f9eacc52468376b216fb86 0 Documentation/technical/api-index-skel.txt
+100755 9c3f4131b8586408acd81d1e60912b51688575ed 0 Documentation/technical/api-index.sh
+100644 dd894043ae8b04269b3aa2108f96cb935217181d 0 Documentation/technical/api-lockfile.txt
+100644 03bb0e950dd1616b00f950f83263835c57bfa70a 0 Documentation/technical/api-object-access.txt
+100644 539863b1f920f8f34ad9272907cbacbd35a7fcbd 0 Documentation/technical/api-parse-options.txt
+100644 e8a1bce94e05f06c5b2aa51d2b610fb9da15d0bb 0 Documentation/technical/api-quote.txt
+100644 073b22bd83badb5aada47e061bb29e48d5f95518 0 Documentation/technical/api-remote.txt
+100644 996da0503acfa3e3a0ed0f57a951d0fbc1500fb8 0 Documentation/technical/api-revision-walking.txt
+100644 75aa5d49234ec36857a7c8d2f3900001af5cbcde 0 Documentation/technical/api-run-command.txt
+100644 4f63a04d7db0e7b578c5034c2856ba95a7ef5739 0 Documentation/technical/api-setup.txt
+100644 a9668e5f2d2b1a7ffac45e4111ca6d8a4818af2b 0 Documentation/technical/api-strbuf.txt
+100644 293bb15d206e71f57e906b33ca27ee05e3429521 0 Documentation/technical/api-string-list.txt
+100644 e3ddf912841298d6317a682a29cbaf628e86f156 0 Documentation/technical/api-tree-walking.txt
+100644 6296ecad1d65511f943fcd82ded188954a33b052 0 Documentation/technical/api-xdiff-interface.txt
+100644 1803e64e465fa4f8f0fe520fc0fd95d0c9def5bd 0 Documentation/technical/pack-format.txt
+100644 103eb5d989349c8e7e0147920b2e218caba9daf9 0 Documentation/technical/pack-heuristics.txt
+100644 9cd48b48597f9b7e822fc3d81e0bc556d6631b02 0 Documentation/technical/pack-protocol.txt
+100644 6bdf034b3af55c8d881fee9153d5cd1824660692 0 Documentation/technical/racy-git.txt
+100644 681efe42190fa28f8e6bc8f1eb569bfcf160ed4b 0 Documentation/technical/send-pack-pipeline.txt
+100644 559263af485f139d6c33d982bed9342aa4110e50 0 Documentation/technical/shallow.txt
+100644 24c84100b0790be22330464e01ea876e5d30fc9a 0 Documentation/technical/trivial-merge.txt
+100644 504ae8a53bca42d7c9ec560b65ddfe14699387a4 0 Documentation/urls-remotes.txt
+100644 fa34c6747194aaecf9e8124462129b8bbc9ae7d4 0 Documentation/urls.txt
+100644 339b30919e6cd9791a5cc30b93395a88fb5e9d96 0 Documentation/user-manual.conf
+100644 00256ca57cc7453ef4a0dce90169078ee96e95e3 0 Documentation/user-manual.txt
+100755 cb7cd4b53827fa6820e84b1318572d0115b3b17f 0 GIT-VERSION-GEN
+100644 7d0c2c2f865d6ed969038e7543dbeb8933723ec3 0 INSTALL
+100644 52c67c1a472455dcce5c19a21bbfd0520ff7dd26 0 Makefile
+100644 548142c327a6790ff8821d67c2ee1eff7a656b52 0 README
+120000 b9a53c3416991b66e1d35c2bbf663b48340b0041 0 RelNotes
+100644 0d561246e0a958d9a7284409b1900a82876eebf3 0 abspath.c
+100644 ccb1108c94436035d0da8b1d6f08f859b68294a3 0 alias.c
+100644 216c23a6f854c614d38c743cd7687a37f304161b 0 alloc.c
+100644 13029619e5ec34bac4ba61a6fc08800ab36f4a1b 0 archive-tar.c
+100644 cf285044e3576d0127c3215cb1253443d67517dc 0 archive-zip.c
+100644 f834b5f51f4cf5d3b73d21dfd99198caef3b19f8 0 archive.c
+100644 0b15b35143fffcc13764e4e668ee452b191cc609 0 archive.h
+100644 9e3ae038e818f4e21bc50f864fc5204f6fa44daa 0 arm/sha1.c
+100644 3952646349cf9d033177e69ba9433652a378c0e9 0 arm/sha1.h
+100644 8c1cb99fb403875af85e4d1524d21f7eb818f59b 0 arm/sha1_arm.S
+100644 17f6a4dca521d9690377f2e93a0192d8a874d2ad 0 attr.c
+100644 f1c2038b0923d3130937eef965667204a8634e6d 0 attr.h
+100644 b88270f90844095b3d352cc4213cbebd95a7f420 0 base85.c
+100644 bd7d078e1ae5fe4ce0a16fda62a2c1743237941b 0 blob.c
+100644 ea5d9e9f8b63be2c7048d19ee53feb06b0795c80 0 blob.h
+100644 b1e59f2196b933ab7169a30efc5d1d340f8f9c5c 0 branch.c
+100644 9f0c2a2c1fab9a312f436880956da0973c68ead8 0 branch.h
+100644 fc3f96eaefff91e4e85adb92162716939f0ecd72 0 builtin-add.c
+100644 fc43eed36b55e4966796490b8c0a02fae790229c 0 builtin-annotate.c
+100644 2216a0bf7cd53adc31346f66a3b9786a1d688bad 0 builtin-apply.c
+100644 22445acbfc5279f391ac6afa855b21064ec54535 0 builtin-archive.c
+100644 8b6b09b10b8f9dcda0b7224f31c860bb803945f0 0 builtin-blame.c
+100644 b1a2ad7a6b3b150cda8d031a87352a4daedc40ea 0 builtin-branch.c
+100644 ac476e7a4b45fc55b6b6d1e4d02be0c35aba2c7b 0 builtin-bundle.c
+100644 7441a56acdbefdd8044a406f4d756ce8a4f06644 0 builtin-cat-file.c
+100644 cb783fc77e75515a02ed2268dfb37ee3bbd03749 0 builtin-check-attr.c
+100644 fe04be77a9312c11fa054897c5982fa6c74b8e5e 0 builtin-check-ref-format.c
+100644 71ebabf9903bd90b7da59c47f1c0819b5f25c538 0 builtin-checkout-index.c
+100644 411cc513c65ba854221ad52dd6aeaaac7d213c9d 0 builtin-checkout.c
+100644 48bf29f40a5e06fd588b34c468535e04abcf206b 0 builtin-clean.c
+100644 e086a40b41810c30a4f5228daa4e38857dae84d5 0 builtin-clone.c
+100644 7a9a309be0543da7d27e7710ef82271f2582e0a9 0 builtin-commit-tree.c
+100644 f7c053a0106c2e42833d0d7c7255b7b636d09a93 0 builtin-commit.c
+100644 91fdc4985d8e64fae12209174dd4aa2d887793e5 0 builtin-config.c
+100644 91b5487478998e39bb8ae4a5cb667360cff82c9a 0 builtin-count-objects.c
+100644 ec404c839b6542deb4e15ca342fd3c0afbbedd2e 0 builtin-describe.c
+100644 9bf10bb37e2f56ec2a10239d7419db8fbb641745 0 builtin-diff-files.c
+100644 17d851b29ee5de33e01745eabcd5cd735c30b352 0 builtin-diff-index.c
+100644 415cb1612f5322da89850874ba81885e41808678 0 builtin-diff-tree.c
+100644 7ffea975059f9e13b07ca680e6707ffc14973f90 0 builtin-diff.c
+100644 070971616dbb12d005c5c9a1f82cc5b0c5391f62 0 builtin-fast-export.c
+100644 7460ab7fce2a4e6a7e014f448819140e2204ccb7 0 builtin-fetch--tool.c
+100644 273239af3be61736ee4ff484d628950c4de7311a 0 builtin-fetch-pack.c
+100644 7eec4a0e43ad5760f1060a7d5bcf2a5083015130 0 builtin-fetch.c
+100644 df02ba7afdd615492361a1897a9dedd6ab233c96 0 builtin-fmt-merge-msg.c
+100644 445039e19c75e4c9321f7ee64289ef8201a25c14 0 builtin-for-each-ref.c
+100644 6eb7da88d3e8591a8c544acc61a42e00babff120 0 builtin-fsck.c
+100644 fac200e0b08360625afc81b02913128c9b87f486 0 builtin-gc.c
+100644 631129ddfd0ffe06f919882d22cfc494d9553f50 0 builtin-grep.c
+100644 3a062487a7eacd01ed824b46a9124dd343cd2e60 0 builtin-http-fetch.c
+100644 baf0d09ac4ea372b4015d399560a133b401b55cc 0 builtin-init-db.c
+100644 f4975cf35f7f1555739f7657ee62ed983d18cb84 0 builtin-log.c
+100644 e8d568eed7ab700bc338af8f589d2f61e81f323c 0 builtin-ls-files.c
+100644 c21b841e7c5e8d27a6e66e7f70786d77aa4653b5 0 builtin-ls-remote.c
+100644 d25767a1f7eb0a8b45bc1eed6b9aa95de0847f18 0 builtin-ls-tree.c
+100644 f974b9df968c74c5d62d58b2a09493e6abb4322e 0 builtin-mailinfo.c
+100644 71f3b3b8741e505fc652e6c74c75972f19211f71 0 builtin-mailsplit.c
+100644 3382b1382a7dcbd525126a35209072da4b4d8041 0 builtin-merge-base.c
+100644 3605960c2d9692514a6df0f344f3c3269cf1de3c 0 builtin-merge-file.c
+100644 8f5bbaf402e020e308e7af9cedb7df1b2ec5a2b7 0 builtin-merge-ours.c
+100644 43e55bf90154c51b94527b2ab7eb7c60fe36e9ec 0 builtin-merge-recursive.c
+100644 dde0c7ed33118ff8d0cc421e8a0366e342c6d011 0 builtin-merge.c
+100644 4f65b5ae9baf66953e79886fd93fe31786b24d36 0 builtin-mv.c
+100644 85612c4dcb719b460623204046e35486e9d9fe97 0 builtin-name-rev.c
+100644 2dadec1630c266bbaf42e84810f7059ed5c43b1e 0 builtin-pack-objects.c
+100644 34246df4ec946273d9f42e6f0848b02d8510beea 0 builtin-pack-refs.c
+100644 10cb8df8457fd5f2ba9be62ecd0f9384e21c3e63 0 builtin-prune-packed.c
+100644 947de8cf258c73d8a327ef3a1daed417ba533f1b 0 builtin-prune.c
+100644 c1ed68d938f67343c6938cfef54d5ff69a522a63 0 builtin-push.c
+100644 72a6de302f88728af17ce5c5c6983c5267afc6f6 0 builtin-read-tree.c
+100644 0c34e378199064e87aa09caf0fa0a2346333ec69 0 builtin-reflog.c
+100644 54d1c3e3d16b2cebcff0c6c57d98756e48472b67 0 builtin-remote.c
+100644 dd4573fe8dcd9dc8edd5a7d41bc8daa83034ee7e 0 builtin-rerere.c
+100644 c24c21909194014b467c86fd3598796e7db576b3 0 builtin-reset.c
+100644 893762c80f4910fadf2d6df414bd835cccb7faaa 0 builtin-rev-list.c
+100644 9aa049ec170b0125fddde29adda3c720c8a7b8ee 0 builtin-rev-parse.c
+100644 e9da870d22c14c32a0e0a6cb71b933c79a2d8b53 0 builtin-revert.c
+100644 ee8247b08cd007f73d5dfffa560a9efe33d327b9 0 builtin-rm.c
+100644 7588d22885d0af24ae80f1d687ccd097fe365021 0 builtin-send-pack.c
+100644 d03f14fdad3d17dde06734d78ddb4aade6ed4f2b 0 builtin-shortlog.c
+100644 233eed499d0b8790781326ff0455bdc7f09fe4d4 0 builtin-show-branch.c
+100644 add16004f11375b1ad2b97f9b1bf1ced5c437f81 0 builtin-show-ref.c
+100644 c0b21301ba4c126a49ed38b6983756b99a25aae0 0 builtin-stripspace.c
+100644 bfc78bb3f6eff2f8e39649b9649ae7263f143ad9 0 builtin-symbolic-ref.c
+100644 325b1b2632e44121c23bc6df556bf3aa4e32ba04 0 builtin-tag.c
+100644 f4bea4a322c26a54734286073c5e67444555c2d9 0 builtin-tar-tree.c
+100644 a8918666655bb91f952ccdac18715bd9ba4a09f2 0 builtin-unpack-objects.c
+100644 38eb53ccba2b97a0fccf50d6ba0b7424fe2d1bcb 0 builtin-update-index.c
+100644 56a0b1b39cf4c4fc51dbbff256240655bc36a038 0 builtin-update-ref.c
+100644 a9b02fa32f372a6810867c10560a20d58b5b2a91 0 builtin-upload-archive.c
+100644 f4ac595695b1fff1317ff7d14ea9427780327aea 0 builtin-verify-pack.c
+100644 729a1593e61d87ad4596f07e7faedac81de64e81 0 builtin-verify-tag.c
+100644 52a3c015ff8e4611522bd41078bdb2934d288d35 0 builtin-write-tree.c
+100644 f3502d305e4f65e9707fe8b738f64be6e49f7f84 0 builtin.h
+100644 00b2aabefca49b634f49143523ee31556baa7777 0 bundle.c
+100644 e2aedd60d6ad1482bb6da173c853e6ba4805c8d7 0 bundle.h
+100644 5f8ee87bb1c446341b640c2f978a658d6bfcfcd0 0 cache-tree.c
+100644 cf8b790874c4a4f5890b360c237ccdd4a5a03de4 0 cache-tree.h
+100644 2475de9fa837596303284157e08b3080d64351ee 0 cache.h
+100755 d6fe6cf1749ebcd6189fa36cbb4e14a532d2d17b 0 check-builtins.sh
+100644 00d92a16631a80ff8ec4e995dafcd3e55434fad5 0 check-racy.c
+100755 a1c4c3e8d845e8e791d7df0c1387e1b2262b5ecf 0 check_bindir
+100644 fc0b72ad59b13e4bd86372e5e81b4f400c99d26e 0 color.c
+100644 6cf5c88aaf8d0e38e2853e6fd212e3cdd6c180cb 0 color.h
+100644 9f80a1c5e3a461afd11966625589684d61187911 0 combine-diff.c
+100644 3583a33ee90647d8e6ded02643eb75753760d94f 0 command-list.txt
+100644 dc0c5bfdab7296bf7febb6f1b1aad64550838c15 0 commit.c
+100644 77de9621d9c926c6fb8a2bf9ca81c6c376a2ad41 0 commit.h
+100644 1f4ead5f981688ee9e29ae2ee281e3904c9131f6 0 compat/fnmatch.c
+100644 cc3ec379400e9334a37cf3f07a61a77f264da885 0 compat/fnmatch.h
+100644 b5ca142fedf2ac0e0cedde1011ab385f65010fdf 0 compat/fopen.c
+100644 069c555da47ea168eea937fcc2d788294bf92ef5 0 compat/hstrerror.c
+100644 f44498258d4c2a0ebd1379ed818d9d04b56f0761 0 compat/inet_ntop.c
+100644 4078fc0877ca99c82152acdd6b7a9eef70a9f8a4 0 compat/inet_pton.c
+100644 cd0d8773641f2fdc808d8b246a8dd2bcd0e5814d 0 compat/memmem.c
+100644 772cad510d5d260fdf33b4f7d6ff79f9f3367b05 0 compat/mingw.c
+100644 290a9e6f822df97984b9f769508aab36419eaf02 0 compat/mingw.h
+100644 34d4b49818b0896b9db19b2b1387f142cbbbd42b 0 compat/mkdtemp.c
+100644 c9d46d174259f42a3e2a2eb073475aba517044be 0 compat/mmap.c
+100644 978cac4ec91e6bb2f81539d85422bb37e4941a51 0 compat/pread.c
+100644 d93dce2cf8fa33bd1fbefe131d2e41a6b954da61 0 compat/qsort.c
+100644 87b33e46697b9a5dd9a9e8391ca3607f7e2ff569 0 compat/regex.c
+100644 6eb64f14020db0a20ba596de5b58b3c552157f16 0 compat/regex.h
+100644 3a22ea7b751efb768d72afa2f97fd963e10eec7e 0 compat/setenv.c
+100644 580966e56a3455b9970b7eef33143c1e9c57d41c 0 compat/snprintf.c
+100644 26896deca64c531f57b4c48ea92134f876b8e537 0 compat/strcasestr.c
+100644 4024c360301ebe7d58ac5b84dcbb692341b649ed 0 compat/strlcpy.c
+100644 5541353a77a22d48ccebd20ede2f510ae20d1492 0 compat/strtoumax.c
+100644 eb29f5e0849370afe90c400271fea12e0f9090aa 0 compat/unsetenv.c
+100644 e2d96dfe6f75213de567174261d9aeba3e663d9d 0 compat/winansi.c
+100644 53f04a076a7275965090edd4ca2a34652c4f5679 0 config.c
+100644 b776149531025c85f5665d971e6e072f0cc64893 0 config.mak.in
+100644 7c2856efc92ca55e3cf03fcf1c72ffb70318f7c3 0 configure.ac
+100644 574f42fa47ffa69328217eb25afee6f85db9595e 0 connect.c
+100644 05f291c1f1d3d1018f390618816f94d0cd58951b 0 contrib/README
+100644 fada5ce909876168f68a85c8ca9a8bc269048acb 0 contrib/blameview/README
+100755 1dec00137b2dd8a888a962edd62f01aad89e4186 0 contrib/blameview/blameview.perl
+100755 30d870187e64e33ed430dc1fab1ea37036a07f58 0 contrib/completion/git-completion.bash
+100644 4009a151deceb45030fb26c5bfcf1b75a423a493 0 contrib/continuous/cidaemon
+100644 b8f5a609af464f3af8b624246cc69eb335ce81d1 0 contrib/continuous/post-receive-cinotify
+100644 90e7900e6d7aff2fadf9ba04f8d982733493411c 0 contrib/convert-objects/convert-objects.c
+100644 9718abf86d8cd36ddae1eae8cf2337e35b927959 0 contrib/convert-objects/git-convert-objects.txt
+100644 c531d9867f6c223be1daf0f6da7538feb11966d8 0 contrib/emacs/.gitignore
+100644 a48540a92b4aa5140a87469b36c1f9b3d8e46e7f 0 contrib/emacs/Makefile
+100644 4fa70c5ad47fcd717d9cbdb23a8142f89227f630 0 contrib/emacs/git-blame.el
+100644 c1cf1cbcc014e5d6c01a1c33efa2d7bd3b76df88 0 contrib/emacs/git.el
+100644 b8f6be5c0af64dfbe7e136f984404f22aea68130 0 contrib/emacs/vc-git.el
+100755 1a7689a48f07a6ed2bb156f745bfea19a10e3eb9 0 contrib/examples/git-checkout.sh
+100755 01c95e9fe8a19afcf331ed5ffd47eea478886213 0 contrib/examples/git-clean.sh
+100755 547228e13ce60e575d0b4a10a322edfff6c0622c 0 contrib/examples/git-clone.sh
+100755 2c4a4062a5317c51601fc4c644c96a7f75e1ef2c 0 contrib/examples/git-commit.sh
+100755 e44af2c86d8e7e44bc79aafcc8ccef3806804720 0 contrib/examples/git-fetch.sh
+100755 1597e9f33f5e001995085639a448f1214010b561 0 contrib/examples/git-gc.sh
+100755 fec70bbf88c614a2dadfc40950fdd7abdf7f2c63 0 contrib/examples/git-ls-remote.sh
+100755 29dba4ba3a57c15bd430bd23c1cebe78e6dc03be 0 contrib/examples/git-merge-ours.sh
+100755 e9588eec33ba5b64d186ff048bb040c18c57e6bc 0 contrib/examples/git-merge.sh
+100755 36bd54c985080f8dd5558a3e7a4e19ede9fbab93 0 contrib/examples/git-remote.perl
+100755 4f692091e73bf633cf986ba2c9bed38bc2c78538 0 contrib/examples/git-rerere.perl
+100755 bafeb52cd113ad8a07ffd1912191f2bc17a7ef7a 0 contrib/examples/git-reset.sh
+100755 0ee1bd898ecbb725d13385408b4ed4bcb413f503 0 contrib/examples/git-resolve.sh
+100755 49f00321b28833c24ebb78ea2104f34091d43017 0 contrib/examples/git-revert.sh
+100755 a13bb6afec2fe5e0b5249523ec8c62d8e517de88 0 contrib/examples/git-svnimport.perl
+100644 71aad8b45bd4c5f59c2ce3746cb3299821729c2a 0 contrib/examples/git-svnimport.txt
+100755 e9f3a228af472c932f6cec5fa25ae49cd841b239 0 contrib/examples/git-tag.sh
+100755 0902a5c21adc4123e36856f73acc1409e17eb0ac 0 contrib/examples/git-verify-tag.sh
+100755 f9fef6db28dbba0ef67589f05eeb937760d2facf 0 contrib/fast-import/git-import.perl
+100755 0ca7718d0518db2e559ecd17eb6f7f57338b80fd 0 contrib/fast-import/git-import.sh
+100755 6ae0429c2dde435f8ae33991ad10f40485aefdc6 0 contrib/fast-import/git-p4
+100644 9f97e884f5c3cae9e89164c9590959ba487a89bd 0 contrib/fast-import/git-p4.bat
+100644 b16a8384bcfbfe33dc33e1076c64f5d36e75e803 0 contrib/fast-import/git-p4.txt
+100755 23aeb257b9557cb146586868084ce1b20d7e7ac8 0 contrib/fast-import/import-tars.perl
+100755 c674fa2d1b5c6ab47ebb5e828c427c6d47bb50fc 0 contrib/fast-import/import-zips.py
+100755 4c99dfb9038ca034d86b72cbe342373d12ae8cc6 0 contrib/gitview/gitview
+100644 77c29de305fabc518edf060b0e6634d9c5c9f71e 0 contrib/gitview/gitview.txt
+100755 7b03204ed18500756ba55818f0808b52db68d048 0 contrib/hg-to-git/hg-to-git.py
+100644 91f8fe6410c06308b6dce47ca28f4c1b8536c5bb 0 contrib/hg-to-git/hg-to-git.txt
+100644 41368950d6b29121089ee9239b8e07ece209a31e 0 contrib/hooks/post-receive-email
+100644 0096f57b7e09f33108d7177405d02eec05811c03 0 contrib/hooks/pre-auto-gc-battery
+100644 dab7c8e3a1829b31f2b10eafe8becf0f067b5a05 0 contrib/hooks/setgitperms.perl
+100644 d18b317b2f018d1d1a5a9677a7bdaf8956d65186 0 contrib/hooks/update-paranoid
+100644 b9892b679320d17c1e9812633d892a7e057865aa 0 contrib/p4import/README
+100644 0f3d97b67eef3108728265e26f5d79c4526d11ac 0 contrib/p4import/git-p4import.py
+100644 9967587fe6bef0cf7cc3e93467bd179f6f58b032 0 contrib/p4import/git-p4import.txt
+100644 f2b08b4f4a5ea29ac6125f5717fa661e11b7d5f9 0 contrib/patches/docbook-xsl-manpages-charmap.patch
+100755 1cda19f66af96fa828de81cbb21817abca0c06ea 0 contrib/remotes2config.sh
+100755 e27fd088be1bd3ecc3da116d5f32ce10d89897ac 0 contrib/stats/git-common-hash
+100755 4b852e2455bab324e3bd16e02ec712fbacbf34b0 0 contrib/stats/mailmap.pl
+100755 f4a7b62cd9f1a397118b95792c04c2f70f910f9e 0 contrib/stats/packinfo.pl
+100644 39f96aa115e0a20024d2f41138db6b2b8c6d5320 0 contrib/thunderbird-patch-inline/README
+100755 cc518f3c890158d29e751e008436e0c3790746ee 0 contrib/thunderbird-patch-inline/appp.sh
+100644 9e7881fea923e47c3c35028ebbc00bce395d4005 0 contrib/vim/README
+100644 332121b40e9c54de9f55362cb57760136039e9fd 0 contrib/vim/syntax/gitcommit.vim
+100755 7959eab902d28bb3307c542514ca4c5f49deee0f 0 contrib/workdir/git-new-workdir
+100644 78efed800d4d64898d438d9590b01be008cfcd36 0 convert.c
+100644 e54d15aced7595ccb11423b0de121db9051ad1f3 0 copy.c
+100644 ace64f165e4a01fb99892e9b89e7df791a7f4ca1 0 csum-file.c
+100644 72c9487f4fd9fcab5e02fc2dc6afd3cb7f9c036a 0 csum-file.h
+100644 ee06eb7f48f1d3e818b3037369b4e056fe7e5be7 0 ctype.c
+100644 4540e8df5ab8bc8ff66549144d7db2928e12199b 0 daemon.c
+100644 35a52576c53e5e1406d40ed4402b8834a29b9f0e 0 date.c
+100644 d9668d2ef94c73e4a7a5602011ff13a9fd9d8c6a 0 decorate.c
+100644 1fa4ad9beb08f23888814b99183487ab85378bfd 0 decorate.h
+100644 40ccf5a1e95f62d840a006274f7024fa43208b1c 0 delta.h
+100644 a4e28df714b4834e5efe42fa3abb647711913d71 0 diff-delta.c
+100644 e7eaff9a68ccbcc692522c9956f0dae9af45f3f1 0 diff-lib.c
+100644 7d68b7f1bef1039b4996e662fb17968c4e3e3e79 0 diff-no-index.c
+100644 cbf25473c594abfd1fc13473108dc9c15e2f1d15 0 diff.c
+100644 50fb5ddb0bec02b0cd5498d6ecc37d44bf874476 0 diff.h
+100644 31cdcfe8bcdae7df65b0387071846299a14bb7be 0 diffcore-break.c
+100644 e670f8512558c38d9a9d6e754cfc609b042b1195 0 diffcore-delta.c
+100644 23e93852d8c701760d56e7e728dba7c08367fbe8 0 diffcore-order.c
+100644 af9fffe6e8e145b066157da8791c749257e7c8e9 0 diffcore-pickaxe.c
+100644 1b2ebb40014d820fe4fb679509ab694d453be7b4 0 diffcore-rename.c
+100644 cc96c20734bf4184970f5381416637cf6e45ea13 0 diffcore.h
+100644 29d1d5ba31def46ba8b55905dc60773cc6cc167e 0 dir.c
+100644 2df15defb6720a742282f24721233c4816deceb6 0 dir.h
+100644 1f73f1ea7dfa6a14dedf384c99751e86c8121ff4 0 dump-cache-tree.c
+100644 eebc3e95fe0c7e61f7c29fa5412ea9d4a5900f92 0 editor.c
+100644 222aaa374b8268828e9d529a8afacb8830acc281 0 entry.c
+100644 0c6d11f6a0c6fa5dbab2f36c4b4ad4de5aba4ac9 0 environment.c
+100644 ce6741eb682b59ad638c7bee6ca31e2fcd53f281 0 exec_cmd.c
+100644 594f961387240c221020c9ea0bccd8a39ff69595 0 exec_cmd.h
+100644 7089e6f9e6c5fa9142f468e54afe7d33a6d2eec7 0 fast-import.c
+100644 8bd9c32561e79d194d27fa10cc98a26aa2cb673c 0 fetch-pack.h
+100755 63dfa4c475ae3632fc5cfd093d949a41683a5458 0 fixup-builtins
+100644 797e3178ae279f444d2efa7e3758652ad0898dd7 0 fsck.c
+100644 990ee02335a2e2693e32baa82b259c23843f2aa0 0 fsck.h
+100755 a2913c2a2cd1ec158157ada3e2deb666892b734b 0 generate-cmdlist.sh
+100755 da768ee7acc22e6480f0a067e109239561d43927 0 git-add--interactive.perl
+100755 6aa819280ef99ccbbdeefde037e99fae3e6f0110 0 git-am.sh
+100755 98f3ede566a6cb0c902ce84795f7de8f8afbe633 0 git-archimport.perl
+100755 3cac20db79e1e408a321b0e9d272501985a3c49b 0 git-bisect.sh
+100644 cf89cdf4598b3796724a85aa707f740245155cdc 0 git-compat-util.h
+100755 6d9f0ef0f989133422cf8c0302e63dab15a999d5 0 git-cvsexportcommit.perl
+100755 e2664ef01308fd0fb65d47b25e0ae73a65aa6262 0 git-cvsimport.perl
+100755 b0a805c688f59af29e1f25b514d73f3991285dee 0 git-cvsserver.perl
+100755 182822a24e214fe7e93a2df68fdda3dd40b5896d 0 git-filter-branch.sh
+100644 6483b21cbfc73601602d628a2c609d3ca84f9e53 0 git-gui/.gitignore
+100755 0ab478ef90aba9048a2de785d538da16e1bae431 0 git-gui/GIT-VERSION-GEN
+100644 55765c8a3aa6b3702b230e8efe3c2ab47a6e73e5 0 git-gui/Makefile
+100755 14b2d9aacd1d28084f195365b434747df2ddc95d 0 git-gui/git-gui.sh
+100644 241ab892cd5b731f07571acf7a0ca3150a763f4f 0 git-gui/lib/about.tcl
+100644 b6e42cbc8fe0a49c301335f78cc2941bd9d59870 0 git-gui/lib/blame.tcl
+100644 777eeb79c1355ec49ce175cc5c33a13df6e41c97 0 git-gui/lib/branch.tcl
+100644 6603703ea163d830c7de1478aa2dd737c4d9d499 0 git-gui/lib/branch_checkout.tcl
+100644 3817771b944cc363205b86c91f7b4801c1d568f9 0 git-gui/lib/branch_create.tcl
+100644 ef1930b4911591566be4561b8c17c24e1cfbfaad 0 git-gui/lib/branch_delete.tcl
+100644 166538808f461275075e2b03c56ddc15b5813e1a 0 git-gui/lib/branch_rename.tcl
+100644 ab470d12648c1dd3560b411e70ea210cc4381e3e 0 git-gui/lib/browser.tcl
+100644 caca88831b7066c573917542d24a52e832dcff34 0 git-gui/lib/checkout_op.tcl
+100644 56443b042c62bc10765aaf6484ad1077a843cb30 0 git-gui/lib/choose_font.tcl
+100644 318078615862adab052d0d0f637f82176a0a785a 0 git-gui/lib/choose_repository.tcl
+100644 c8821c146386f850c0794df70f605cd9f18dcff3 0 git-gui/lib/choose_rev.tcl
+100644 dc2141192a21e7416268cc94beda78d6ceb8f86f 0 git-gui/lib/class.tcl
+100644 40a710355751836e78b65101592b753266f507ca 0 git-gui/lib/commit.tcl
+100644 c112464ec367a2db707a3f28ff6c588aefe7985f 0 git-gui/lib/console.tcl
+100644 a18ac8b4308d8263a0688058524282b72bafe77a 0 git-gui/lib/database.tcl
+100644 abe82992b6529cf49983029d85348df5d27ceaf5 0 git-gui/lib/date.tcl
+100644 52b79e4a1f476c2ee9b65087f66a352a25ed0903 0 git-gui/lib/diff.tcl
+100644 7f06b0d47f0fa214c98644757f99f8a036b9689e 0 git-gui/lib/encoding.tcl
+100644 75650157e551e34dab650d89f3fa6d25afc91d6a 0 git-gui/lib/error.tcl
+100644 334cfa5a1a59c320e86789ccf4ed3320584a0215 0 git-gui/lib/git-gui.ico
+100644 3c1fce7475d362d1880d915ff4bdf168fda28593 0 git-gui/lib/index.tcl
+100644 5ff76692f5eeeb51bcca0905385f51963d1e6531 0 git-gui/lib/logo.tcl
+100644 5c01875b051305b5b40a17ac7a2245f69081f41b 0 git-gui/lib/merge.tcl
+100644 ffb3f00ff0a992254804cc047b5a63ce82aa5bd9 0 git-gui/lib/option.tcl
+100644 0e86ddac0981fbb575a7dd5294ddaed29f7c3917 0 git-gui/lib/remote.tcl
+100644 c7b81486984d46a9dca59867c406a8e247d76313 0 git-gui/lib/remote_branch_delete.tcl
+100644 38c3151b05c732d919943e44629bfc0a8c9fb617 0 git-gui/lib/shortcut.tcl
+100644 78f344f08f34842c134b6b0e22b6eb8c49b1dbbd 0 git-gui/lib/spellcheck.tcl
+100644 51d4177551b911c35cfd8004a36fca4259367d24 0 git-gui/lib/status_bar.tcl
+100644 8e6a9d0a6010cf5efee069a2d488124bcbdb54cd 0 git-gui/lib/transport.tcl
+100644 d7f93d045d1a2b3a14d2fdb4907697622b5973a8 0 git-gui/lib/win32.tcl
+100644 117923f8860bb8f0f04c1664d8cbe38804a59831 0 git-gui/lib/win32_shortcut.js
+100644 ddbe6334a258dae46b6c333d53590f3b920a9cab 0 git-gui/macosx/AppMain.tcl
+100644 b3bf15fa1c1a41265460664417caf47265553a4f 0 git-gui/macosx/Info.plist
+100644 77d88a77a7669667335cf6fd5767c8b40f3ce6e7 0 git-gui/macosx/git-gui.icns
+100644 a89cf4496990737117d7558a7465f68aa058e465 0 git-gui/po/.gitignore
+100644 5e77a7d7d2d9e82311c1573035fa020c8d08b38c 0 git-gui/po/README
+100644 f20955c18520bf2b0cc8826da9e1dc93a5624ac3 0 git-gui/po/de.po
+100644 89b6d51ea011d5b0fc8a343ffdda078d659571cb 0 git-gui/po/fr.po
+100644 813199f782968cb0949d24119145e8b3e4a174cd 0 git-gui/po/git-gui.pot
+100644 749aa2e7ec1b02e6af3427516b1197f77bd48795 0 git-gui/po/glossary/Makefile
+100644 35764d1d22da45e90638b2db3e0bfbcb332e8696 0 git-gui/po/glossary/de.po
+100644 27c006abb2adca055ebf7e44ce9a4ec351af19c5 0 git-gui/po/glossary/fr.po
+100644 40eb3e9c07a4d39091972655d8a99110fd361be5 0 git-gui/po/glossary/git-gui-glossary.pot
+100644 9b31f69152025e484ddf467d7884c2bf2140a894 0 git-gui/po/glossary/git-gui-glossary.txt
+100644 bb46b48d6b84446a23c14af88c339fda7e417718 0 git-gui/po/glossary/it.po
+100755 49bf7c5365130ec290948ee8abba28d757774381 0 git-gui/po/glossary/txt-to-pot.sh
+100644 158835b5c1c9364735167e618af62272c8bb7a8d 0 git-gui/po/glossary/zh_cn.po
+100644 28760ed97838d39effd035ab4f1159c0085221f8 0 git-gui/po/hu.po
+100644 11cc79bb5ec9c8f1a158ceb457157705b04d4adf 0 git-gui/po/it.po
+100644 28e6d6246b5a07bc0dfe29dde4727be0cf0ba40c 0 git-gui/po/ja.po
+100644 b7c4bf3fdffb3d04b8c01b25e99a706e499de0d1 0 git-gui/po/po2msg.sh
+100644 db55b3e0a69813cba16932212ee1b2ce0f5b2b9a 0 git-gui/po/ru.po
+100644 4da687bb41f5471eaa6dd49c2ffae1eaa053ec68 0 git-gui/po/sv.po
+100644 d2c686667163ec4cd83045efd429e3413564290e 0 git-gui/po/zh_cn.po
+100644 53c3a94686813936445efbb055dc4f02885c70e9 0 git-gui/windows/git-gui.sh
+100755 0843372b57371b62cd68f2818f634209f55d5395 0 git-instaweb.sh
+100755 9cedaf80ceac1d4100adf3cfb152c76c7f945e4d 0 git-lost-found.sh
+100755 645e1147dc886f2b1ca6d2020b44db746b082bf0 0 git-merge-octopus.sh
+100755 e1eb9632660146396a0b5f3f2a410d8cb027ff9d 0 git-merge-one-file.sh
+100755 93bcfc2f5dce418d00f26257788932d5c738785c 0 git-merge-resolve.sh
+100755 94187c306ccb05d977f2bb35e81828130ab49a61 0 git-mergetool.sh
+100755 695a4094bb4230341618bd6f16d0bea9bff2e826 0 git-parse-remote.sh
+100755 75c36100a2f858bcf2663d2b4560654787963175 0 git-pull.sh
+100755 cebaee1cc9dfc28d80173583b144a480be2f9bfd 0 git-quiltimport.sh
+100755 4e334ba41dad3067394b79c15ebfe610b2d3e178 0 git-rebase--interactive.sh
+100755 412e135c3ae88d76b5bdf3f08083b153da220a95 0 git-rebase.sh
+100755 937c69a74858a8a3c63bb41a23705b579df1b3a3 0 git-relink.perl
+100755 683960b04d6b743e687b2eb640d2b0e00ccfd313 0 git-repack.sh
+100755 073a314c8043e0ff30afde65e012e356ff0d186f 0 git-request-pull.sh
+100755 d2fd89907688a044ffe0d2520744e00a9b33c942 0 git-send-email.perl
+100755 dbdf209ec0e7d6468c199d1905c3e7788a9cd246 0 git-sh-setup.sh
+100755 d4609ed66e56dc6021c800d60286bec38615ff39 0 git-stash.sh
+100755 b40f876a2ca9fe985cedc622ab28a9f461edc5ab 0 git-submodule.sh
+100755 cf6dbbc42773fef394c27cd87109b69c3144753c 0 git-svn.perl
+100755 384148a59fc492d8fb1d6ea4fc4532aa1e5ffc22 0 git-web--browse.sh
+100644 37b1d76a08ca59f3de54e11890dce962403cf8d3 0 git.c
+100644 c6492e5be2763eab81358424ff625a34a5ff2fba 0 git.spec.in
+100644 e1b6045605865cbfc4ae0d57039111d5df825649 0 gitk-git/Makefile
+100644 fddcb45817ed6839ba95965d7e57e9a2e04ae30a 0 gitk-git/gitk
+100644 e358dd1903352f5cd65ac77e777ae14d6887adc0 0 gitk-git/po/.gitignore
+100644 b9867bf8e05d06f7effb9919f00879f77690e185 0 gitk-git/po/de.po
+100644 2cb148624723adf82fd7f4a361133dbc8909db93 0 gitk-git/po/es.po
+100644 d0f4c2e19ac15b10c01d6df968f823914cdbba4a 0 gitk-git/po/it.po
+100644 c63248e3752b8b479f75ad2fe772dd40f684be54 0 gitk-git/po/po2msg.sh
+100644 f6b080df4cf313edaba241eb54c232e9f282a38c 0 gitk-git/po/sv.po
+100644 26967e201aca8ea1c799e6b21cad468484753779 0 gitweb/INSTALL
+100644 825162a0b6dce8c354de67a30abfbad94d29fdde 0 gitweb/README
+100644 de637c0608090162a6ce6b51d5f9bfe512cf8bcf 0 gitweb/git-favicon.png
+100644 16ae8d5382de5ffe63b54139245143513a87446e 0 gitweb/git-logo.png
+100644 aa0eeca24786dbd5143354fc3bb5e8cdb3ef831f 0 gitweb/gitweb.css
+100755 90cd99bf916135e5c0a9e1bd7d5e9ff45555c489 0 gitweb/gitweb.perl
+100644 e2633f8376eb7b12706dcd4c698e2b3f6be2b433 0 graph.c
+100644 eab4e3daba9812293d4e005c3ebe28f9a97744ce 0 graph.h
+100644 f67d6716ea5f42c3384a7a4cb2eb973b02785fba 0 grep.c
+100644 d252dd25f81526d9b8663b4d3c9585d69a901397 0 grep.h
+100644 46c06a9552dac5475afc607c3fe2bf00801eb055 0 hash-object.c
+100644 1cd4c9d5c0945994b84bb25edd6e4685cf76b5c5 0 hash.c
+100644 69e33a47b9861df9ac12c354eae180b4f8fea857 0 hash.h
+100644 3cb19628965685ce59a5377b81bef975851996e8 0 help.c
+100644 68052888570af7d09535db8831b8cf3ef2881589 0 http-push.c
+100644 9dc6b27b457a2979a95018679a0b885e6fb62d9a 0 http-walker.c
+100644 1108ab4a3101fb4768cad420ccfdb52d87890a18 0 http.c
+100644 905b4629a47789705c13745fd56ce0c91adea41b 0 http.h
+100644 b35504a8d25594a8d243ae7490733eae5a262712 0 ident.c
+100644 1ec131092109aa3fbed3cd20f10b56a864584a94 0 imap-send.c
+100644 52064befdbbbdf671bd08e369a133d4f1fee03c1 0 index-pack.c
+100644 7f03bd99c5b66afa6cc7fa11a2430301a3042656 0 interpolate.c
+100644 77407e67dca97eb85274c69e2e7469e1d4d40b3b 0 interpolate.h
+100644 c8b8375e4983794e601ba69a1c217a3c711835e9 0 list-objects.c
+100644 0f41391ecc00eac324ea76de7654781c4fce094e 0 list-objects.h
+100644 9837c842a3f215ebee7cbe9690e42e216fb5c76c 0 ll-merge.c
+100644 5388422d091ede134d42406291989c49553f7428 0 ll-merge.h
+100644 4023797b00fe21ecbabe3407ef8a12fca0690607 0 lockfile.c
+100644 bd8b9e45ab46b8664c8b7016b33bee22f86c9e0d 0 log-tree.c
+100644 59ba4c48b7966db34c6345a445ab0b10e235ac83 0 log-tree.h
+100644 88fc6f394684436967002ca477eac1e084537348 0 mailmap.c
+100644 6e48f83cedd13e24d50cddf47f037791ddc5ad4b 0 mailmap.h
+100644 0fd6df7d6ed839eaed536bc332312c2688a6bbad 0 match-trees.c
+100644 2a939c9dd835a7e7946eb1548e4cf637ae3ca329 0 merge-file.c
+100644 7491c56ad25332fb4aae6a075bf0577a1d800c3b 0 merge-index.c
+100644 f37630a8ad07709ae106ddde44a34daf6bad8b16 0 merge-recursive.h
+100644 02fc10f7e622ba1c53065e7cf4563ff10af0c41f 0 merge-tree.c
+100644 0b34341f711a903d4a12fe96dc6ef63e55fb2f5b 0 mktag.c
+100644 e0da110a98d3a7376dc78df71fabc10fc5664296 0 mktree.c
+100644 3f06b835675206912777a774d91c3ba611fa5a06 0 mozilla-sha1/sha1.c
+100644 16f2d3d43ca8bee1eeb306308277bef8c707a972 0 mozilla-sha1/sha1.h
+100644 0031d78e8c98a32d61cd0dc0f939a033e24ed890 0 name-hash.c
+100644 50b6528001fe4bafdfe70126dc2078860c3d1969 0 object.c
+100644 036bd66fe9b6591e959e6df51160e636ab1a682e 0 object.h
+100644 f596bf2db5e0a0065e6856b8caa3ded8a134f74d 0 pack-check.c
+100644 25b81a445c8fafe0c00ce30082b7d9a7c22ccf1e 0 pack-redundant.c
+100644 848d311c2b2c651dbb14893c260584f00c639357 0 pack-refs.c
+100644 518acfb370ad72be18399a3ac5e8ca17880281c9 0 pack-refs.h
+100644 cd300bdff5b524a4d509ba5276e9ef21f443013d 0 pack-revindex.c
+100644 36a514a6cf600e7e77794e50998a9d160e30c8e9 0 pack-revindex.h
+100644 a8f02699366c87de960d7637e9f69c26c2241693 0 pack-write.c
+100644 76e6aa2aad06545e7c44fc2c1e117ea668356ccf 0 pack.h
+100644 6b5c9e44b4ded338ddb344ae454d83a685b7569a 0 pager.c
+100644 71a7acf4e22bd12c0919f277410d6ec52dd5efc8 0 parse-options.c
+100644 bc317e7512af7a1cc86641a651ae5415d28e71c4 0 parse-options.h
+100644 ed9db81fa82c812c9ffa07f5a40540dbb15da0d3 0 patch-delta.c
+100644 9349bc5580456b378d41da7cc2518e4fa9a7e81a 0 patch-id.c
+100644 3be5d3165e0009761a0ca69e15e4a9132c6cfaff 0 patch-ids.c
+100644 c8c7ca110ad34def12a3594a1560b3c3052eb701 0 patch-ids.h
+100644 9df447bd6dcfaddf7f05fe5f0b624700ff1f40d7 0 path.c
+100644 98b24772c7ebe838d513d8e24f3c8acff7839cb9 0 perl/.gitignore
+100644 d99e7782002e01079b3866003cc8555b7e130e3f 0 perl/Git.pm
+100644 b8547db2c64ac1242725b5f71fb646b5bca38ef3 0 perl/Makefile
+100644 320253eb8e91eb1d914aa4e34f7d3af4649b9b39 0 perl/Makefile.PL
+100644 11e9cd9a02eb3f85a9150c6fb06d1fc76abd9b09 0 perl/private-Error.pm
+100644 f5d00863a6234c16db33637d19fefd2014780e87 0 pkt-line.c
+100644 9df653f6f5afe720870658d7093bddbf3e66beaf 0 pkt-line.h
+100644 738e36c1e81def4822ccc2a66bc2761402a07f26 0 ppc/sha1.c
+100644 c3c51aa4d487f2e85c02b0257c1f0b57d6158d76 0 ppc/sha1.h
+100644 f132696ee72bf4a2e3d608a24322a6839f9a03a8 0 ppc/sha1ppc.S
+100644 33ef34a4119812674726254fee3f391fb5734fdb 0 pretty.c
+100644 55a8687ad15788f8ea5a5beb463d216908f618b2 0 progress.c
+100644 611e4c4d42d8d1164add09f926ad5b2ce088db5e 0 progress.h
+100644 6a520855d6c418ecb1384ef9571b122b134af1af 0 quote.c
+100644 c5eea6f18e2dfabd071b73e6507c34c2b7b5e39f 0 quote.h
+100644 3b1c18ff9b9060d0dd437ce89aedb8871c66c54c 0 reachable.c
+100644 40751810b64f8bbf9c0a633472a0ef27d23ed1a5 0 reachable.h
+100644 2c03ec3069decb20f7557af4ac7dbe295f2dcf9c 0 read-cache.c
+100644 d44c19e6b577023dcbaa188a0e67130ff4e5bd9a 0 receive-pack.c
+100644 f751fdc8d832cae54647c1a70d888e979d324fd8 0 reflog-walk.c
+100644 7ca1438f4d74b652f962c6bdfddd08fe0d75802d 0 reflog-walk.h
+100644 39a3b23804d2da715c564459bf320be23d41c1bf 0 refs.c
+100644 06ad26055661a9b9e475d0f8a7bd6d1cfb42e792 0 refs.h
+100644 f61a3ab399aa6960fb8eba050321cea4a3b05344 0 remote.c
+100644 091b1d041f8a4d255f59bfc001e098e692dbc15c 0 remote.h
+100644 323e493dafee46c0d3f95e3c4cd9c4c9b463bbef 0 rerere.c
+100644 f9b03862fe78b560ee606637be3b1ce972a2cc14 0 rerere.h
+100644 3897fec53170c50921eb1952bc4bdf9c08480638 0 revision.c
+100644 f64e8ce7ff999e9fe4a01205ae51775827484ed4 0 revision.h
+100644 a3b28a64dc2d1b888b0ba2a135be10fe04651201 0 run-command.c
+100644 5203a9ebb10b14bd06862abafed0ab73d7514a3d 0 run-command.h
+100644 8ff1dc35390083c3648c4ee5790f35633d956069 0 send-pack.h
+100644 c1c073b2f05a48772a45602cdc711eef6e211695 0 server-info.c
+100644 6cf909463d4ad3681a2f35269db9dc944f4389c2 0 setup.c
+100644 da357479cf19aad4bebc64f874c76fdf8566712b 0 sha1-lookup.c
+100644 3249a81b3d664afc89c98e6d9dd6b512092a82f9 0 sha1-lookup.h
+100644 e281c14f01d37ab7623998c2990914aca49a7a3b 0 sha1_file.c
+100644 4fb77f8863ec075de38b84171d3ef039a00cee4c 0 sha1_name.c
+100644 4d90eda19efe0a80c1cb39e8897ab3ed5e6fcf56 0 shallow.c
+100644 6a48de05ff80f86050715ef3dab87a48b0a86ac9 0 shell.c
+100644 bc02cc29ef0d5f640ab390614def995f30fe4691 0 shortlog.h
+100644 45bb535773fd9c36f73502df9462f7de800009c8 0 show-index.c
+100644 b6777812cb92c1c169ee395164d53a0c2e6eceb2 0 sideband.c
+100644 a84b6917c7a17b5f8a922540801e98d46aa24431 0 sideband.h
+100644 720737d856b694bc5239f0c18af372959c99e744 0 strbuf.c
+100644 eba7ba423a2d3a383ef93f663c95695438269edf 0 strbuf.h
+100644 ddd83c8c76112cecd5d23668aaca467601855a72 0 string-list.c
+100644 4d6a7051fe5bccf04a0d0c32a90e5cf9c00dba3c 0 string-list.h
+100644 5a5e781a15d7d9cb60797958433eca896b31ec85 0 symlinks.c
+100644 1b97c5465b7d9e4404e11668b44c5c507a302d4a 0 t/.gitattributes
+100644 b27e280083867ac03c4abc188f0f37291eb123a0 0 t/.gitignore
+100644 0d65cedaa6566a6dd654753cb574c9ee64b1c90b 0 t/Makefile
+100644 8f12d48fe8b4ffe4a4b37dcd16ce58e50837433f 0 t/README
+100755 d5bab75d7da49ebb53e368d67f6b867f5417a125 0 t/aggregate-results.sh
+100644 cacb273afff1fbddf152bb440451fa141589cf33 0 t/annotate-tests.sh
+100644 4bddeb591ecc17ec532164d0d6cf1ad1a54eb996 0 t/diff-lib.sh
+100644 a841df2a9e3a9ed64e81ab7b9778e59cfc714cad 0 t/lib-git-svn.sh
+100644 dc473dfb53d5ffafee72738a55caf21732fa4fb1 0 t/lib-httpd.sh
+100644 4717c2d33b70af6527f8951ec8a414e8caf87095 0 t/lib-httpd/apache.conf
+100644 6dab2579cbf9658c3ac2bd55c8a66333d67eda47 0 t/lib-httpd/ssl.cnf
+100644 168329adbc4edeedc98501575ccc9b9c81f0c061 0 t/lib-read-tree-m-3way.sh
+100755 70df15cbd8339b552a56a95ca0c0893138550201 0 t/t0000-basic.sh
+100755 620da5b32041b1ad69bfdcb6d139f2705386a5ff 0 t/t0001-init.sh
+100755 4db4ac44c9611398db46dfbe2688c95e3b03605b 0 t/t0002-gitfile.sh
+100755 3d8e06a20fade230136d50736a2f621d3c96002c 0 t/t0003-attributes.sh
+100755 63e1217e7162435c3da8ec7984b5f6a53b3a10e2 0 t/t0004-unwritable.sh
+100755 e45a9e40e432524454e94a041599b201a092879a 0 t/t0010-racy-git.sh
+100755 1be7446d8d9f8a46b463f2474a8c25bdd33044d2 0 t/t0020-crlf.sh
+100755 8fc39d77cec6168dae930beef785597dace24aa3 0 t/t0021-conversion.sh
+100755 7d1ce2d0563b3734d754c171d21580075264bbb2 0 t/t0022-crlf-rename.sh
+100755 6f8a4347d5397b8b396db800c12c6e045a0d2b7c 0 t/t0023-crlf-am.sh
+100755 ccb0a3cb61be3bb591033564b221726a4cd3968d 0 t/t0030-stripspace.sh
+100755 03dbe00102626e05c37e45d8a3b1364b99644942 0 t/t0040-parse-options.sh
+100755 b177174ef53e7689cc8c18b134afdbe90be72744 0 t/t0050-filesystem.sh
+100755 6e7501f352ee97636280357da54c50d73ceb0138 0 t/t0060-path-utils.sh
+100755 807fb83af8c65304f1dae2ee35ba0f2909ddf465 0 t/t1000-read-tree-m-3way.sh
+100755 4b44e131b27df0cc6a73590b045c2eb87b104f59 0 t/t1001-read-tree-m-2way.sh
+100755 aa9dd580a658ffd980ec9689b01f7964580661f2 0 t/t1002-read-tree-m-u-2way.sh
+100755 8c6d67edda1468ba0f1c7afc6d13ea3a7bbe0a90 0 t/t1003-read-tree-prefix.sh
+100755 570d3729bd2312a8d9cf90f3d2e1121a58f43de6 0 t/t1004-read-tree-m-u-wf.sh
+100755 b0d31f5a9bb8b3474665147327d94ad5067fa206 0 t/t1005-read-tree-reset.sh
+100755 d8b7f2ffbcc0427b1ae9d48feb4387f580e81d61 0 t/t1006-cat-file.sh
+100755 1ec0535138c72bbd1e497c35c21bc5ea46b0315f 0 t/t1007-hash-object.sh
+100755 fc386ba033ac165a5f4a9fca0c6c6f5db49a314e 0 t/t1020-subdirectory.sh
+100755 7f7fc36734d96de96801c59af41024db97dc614d 0 t/t1100-commit-tree-options.sh
+100755 09a8199335cbdf96f8aba75d47a321f0cfb828d9 0 t/t1200-tutorial.sh
+100755 64567fb94d5c3f9587b643333212cdb37a4661ac 0 t/t1300-repo-config.sh
+100755 dc85e8b60a5c10e57047d1692e383f177e2c478d 0 t/t1301-shared-repo.sh
+100755 8d305b43725f8cf60e7ee802df1923feb98eeae5 0 t/t1302-repo-version.sh
+100755 f98f4c51796e6f7a7181568a134e21ecd9dc2c4f 0 t/t1303-wacky-config.sh
+100755 b31e4b1ac66e56d67ba48ab213c4ef9c32f05ea8 0 t/t1400-update-ref.sh
+100755 73f830db2374e751fb46e25b345e860979b9dd05 0 t/t1410-reflog.sh
+100755 dc9e402c55574d981e161d4e38e74617c411f46d 0 t/t1420-lost-found.sh
+100755 85da4caa7ed1b8bcaca7b21e218f2d1839d2db82 0 t/t1500-rev-parse.sh
+100755 2ee88d8a069288d0d9f6931231162e04d6b0917a 0 t/t1501-worktree.sh
+100755 997002d4c40dd8e66e3be5a701e3d99bab1c57c4 0 t/t1502-rev-parse-parseopt.sh
+100755 95244c9bcf54de8cb3584b4022e53a84051d496f 0 t/t1503-rev-parse-verify.sh
+100755 91b704a3a4ce6771071d19bd84aa228856fe6875 0 t/t1504-ceiling-dirs.sh
+100755 f7e1a735ec8699616280a086f59dc50c078bfaa7 0 t/t2000-checkout-cache-clash.sh
+100755 ef007532b15108d72445f7c95a2906a3039fbbbb 0 t/t2001-checkout-cache-clash.sh
+100755 70361c806e1baf1b26810983374c53eb49ea2f2d 0 t/t2002-checkout-cache-u.sh
+100755 71894b37439bd1b9c72194cbbabe37680d2f9743 0 t/t2003-checkout-cache-mkdir.sh
+100755 39133b8c7a4b56cb7273cec607ea89081a426eff 0 t/t2004-checkout-cache-temp.sh
+100755 a84c5a6af9e69ffec7689827ce1ba653a658a73f 0 t/t2005-checkout-index-symlinks.sh
+100755 0526fce163fc13273daf035a0920a6b53a3acefb 0 t/t2007-checkout-symlink.sh
+100755 3e098ab31e1944abe8e5815c0f219947620b6618 0 t/t2008-checkout-subdir.sh
+100755 f3c21520877e271506be13b5cabad5e7906f0c91 0 t/t2009-checkout-statinfo.sh
+100755 7cc0a3582ef1bb1598bc5dfc5334bfbe006c3f5a 0 t/t2010-checkout-ambiguous.sh
+100755 88f268b9d7a696a06f5ce560c1e8ed0f3d8dc3a3 0 t/t2050-git-dir-relative.sh
+100755 6ef2dcfd8afece86aaf6345630179af179eb2ed9 0 t/t2100-update-cache-badpath.sh
+100755 59b560bfdf240e87516aadd6a31a2fe84e85d49a 0 t/t2101-update-index-reupdate.sh
+100755 19d0894d260787d37a43199d7a3f6c3aa37d32aa 0 t/t2102-update-index-symlinks.sh
+100755 332694e7d38083fad18b3e53e4def268d54e9423 0 t/t2103-update-index-ignore-missing.sh
+100755 f57a6e077c3b85dcdedc3f4813150feebc8e647d 0 t/t2200-add-update.sh
+100755 d24c7d9e5fce0e9c0f8ef5576dab86ffdbc11331 0 t/t2201-add-update-typechange.sh
+100755 6a8151064c8256bd03a90460eb1bd6970428f2f0 0 t/t2202-add-addremove.sh
+100755 bc0a3513920cab41e4335b8c1b5163e25e8354d3 0 t/t3000-ls-files-others.sh
+100755 1caeacafa7ae70506e626498d274dbfa25f1b036 0 t/t3001-ls-files-others-exclude.sh
+100755 8704b04e1b4150357a7a01c91ac59bb1f22cbb8e 0 t/t3002-ls-files-dashpath.sh
+100755 ec1404063701eef04667d5ffbbb4bdc8051c773b 0 t/t3010-ls-files-killed-modified.sh
+100755 af8c4121abfc28b7e289b39936df45bd5b82cf22 0 t/t3020-ls-files-error-unmatch.sh
+100755 aff360303ae2a304bff4799def6906defdb85843 0 t/t3030-merge-recursive.sh
+100755 f6973e96a59916c6048222bfa0064aec5dea3746 0 t/t3040-subprojects-basic.sh
+100755 4261e9641e00fb3b543384b6a8dbbcc1a214b598 0 t/t3050-subprojects-fetch.sh
+100755 3ce501bb9794900b99fbbf2f2ccfbb330f7947a7 0 t/t3060-ls-files-with-tree.sh
+100755 6e6a2542a22712006ae23874069c55943a3cba27 0 t/t3100-ls-tree-restrict.sh
+100755 4dd7d12bac62eae23516686c0ece0edf037f0317 0 t/t3101-ls-tree-dirname.sh
+100755 7a83fbfe4f6b47dc5dbaa3df59c8633ae5c2c8f8 0 t/t3200-branch.sh
+100755 f86f4bc5ebcc0e36ddb4071a6aeb855e1039faa6 0 t/t3201-branch-contains.sh
+100755 7fe4a6ecb05df0fbfb825fbb08207f7672e1775f 0 t/t3202-show-branch-octopus.sh
+100755 c2dec1c6320a0f9b555e3cd38d164c4e3efcb51e 0 t/t3210-pack-refs.sh
+100755 0574ef1f101df172a30755726b0ea1b6c2ef5f7d 0 t/t3300-funny-names.sh
+100755 91bb5e1d9eea0b2f1ff7a1120d97ca2876a8f277 0 t/t3400-rebase.sh
+100755 166ddb1447db4c33a79f0e9aea21cb00e8a151f2 0 t/t3401-rebase-partial.sh
+100755 7b7d07269ae35f56dd02a223f350ae0da97bae85 0 t/t3402-rebase-merge.sh
+100755 0d33c71daa557e68268dfb2279a02fe2afca1ed7 0 t/t3403-rebase-skip.sh
+100755 ffe3dd97b7b1c056d854e28795e1313ce1633452 0 t/t3404-rebase-interactive.sh
+100755 e5ad67c643ffee9b79fce813673732faa950714f 0 t/t3405-rebase-malformed.sh
+100755 539108094345e3e0ba4cf03fc20a5ca6486fa230 0 t/t3406-rebase-message.sh
+100755 4de550a632e6ead08c9629e80901e4735c53f55c 0 t/t3407-rebase-abort.sh
+100755 e12cd578e8663ad8717aecde310bb0b6a500c2a2 0 t/t3408-rebase-multi-line.sh
+100755 4911c48378a137471d2ad56747ceed11d0115be5 0 t/t3500-cherry.sh
+100755 6da212825a447866364979c2fb10778b6bbc02d5 0 t/t3501-revert-cherry-pick.sh
+100755 0ab52da902c8d602e9c4d64660aa4a7e8e35544f 0 t/t3502-cherry-pick-merge.sh
+100755 b0faa299183df5fe06ccaf383bce47cbb9a0cf89 0 t/t3503-cherry-pick-root.sh
+100755 79c06adf1f035cf727771974b2f9713da9d2fb8c 0 t/t3600-rm.sh
+100755 7d123d17fc156c61a8e85a399c3762e8075485de 0 t/t3700-add.sh
+100755 e95663d8e66d5b94e574a6b956625fccfd341a05 0 t/t3701-add-interactive.sh
+100755 c851db8ca9373a890ede7c230710690d5b4b4165 0 t/t3800-mktag.sh
+100755 883281dbd6c02ea7b2d90336c2629eafacee0257 0 t/t3900-i18n-commit.sh
+100644 ee31e1973829739baebbdc1ba0a56391adb2fe2f 0 t/t3900/1-UTF-8.txt
+100644 63f4f8f121dffe43c1902d1a7357b6303072714d 0 t/t3900/2-UTF-8.txt
+100644 546f2aac01b67e39d19de601f5586097b34a8325 0 t/t3900/EUCJP.txt
+100644 74b533042f6d1dfd5cb8fae5a538a43938c2df8d 0 t/t3900/ISO-2022-JP.txt
+100644 7cbef0ee6f430c611134a06a6dd6c12fbea589d5 0 t/t3900/ISO-8859-1.txt
+100755 38c21a6a7fa9a643030f68fd6dd1269b9c640608 0 t/t3901-8859-1.txt
+100755 235f372832cb32aefff0a00c4f2ac0e19de2e55d 0 t/t3901-i18n-patch.sh
+100755 5f5205cd022ba3a96eb8e5eb73292bd0d4a8ab87 0 t/t3901-utf8.txt
+100755 fe4fb5116ac4c482c357f0af3f0a34da27cee237 0 t/t3902-quoted.sh
+100755 8d4804b65818f7fc55f0c0736fde673ac7512a8a 0 t/t3903-stash.sh
+100755 c44b27aeb24816a346f0aa84d70546a0ffd83b2a 0 t/t4000-diff-format.sh
+100755 a32692417db73444dbdc143e6908b7371be79d42 0 t/t4001-diff-rename.sh
+100755 a4cfde6b2927a4655f582d7e92dad4568f7b5f89 0 t/t4002-diff-basic.sh
+100755 8b1f875286b25b5fc1a527b5b0281f866724a82d 0 t/t4003-diff-rename-1.sh
+100755 3d25be7a6709cdd23e0d583a8f1a3e19a3927cd8 0 t/t4004-diff-rename-symlink.sh
+100755 66300173124eee8480e7214322faf8bc493ad940 0 t/t4005-diff-rename-2.sh
+100755 4e92fce1d00a55cfbc39e55b53f95cc309e96ff2 0 t/t4006-diff-mode.sh
+100755 104a4e1492b65a64d061e1ce1df0b0a2a49fb20e 0 t/t4007-rename-3.sh
+100755 26c2e4aa65c539c527ae8e2d71b5abb40c21fbbd 0 t/t4008-diff-break-rewrite.sh
+100755 d2b45e7b8fb3902cb740e0df582f92195a295f24 0 t/t4009-diff-rename-4.sh
+100755 ad3d9e48454d2e72afce682df009cdaaee9ba3c5 0 t/t4010-diff-pathspec.sh
+100755 c6d13693ba45b594704c2ef55d40540ee3f9c25f 0 t/t4011-diff-symlink.sh
+100755 eced1f30fb8475739aef52230bbb79946a0f76d8 0 t/t4012-diff-binary.sh
+100755 9337b81064bbdbe4e7f590830b458c48226c4a17 0 t/t4013-diff-various.sh
+100644 78f8970e2be272114368ee28ca2d55f345a6494a 0 t/t4013/diff.config_format.subjectprefix_DIFFERENT_PREFIX
+100644 3a9f78a09df1bb12aefbb2b5fb75fd0b9455ed06 0 t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master
+100644 a61ad8cb130093ed63bba5335a0b283f9136177e 0 t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side
+100644 49f23b9215c3179d8923915ee2e497ccbc53875a 0 t/t4013/diff.diff-tree_--cc_--patch-with-stat_master
+100644 cc6eb3b3d50f2d620df7116bf64992a4dd42b736 0 t/t4013/diff.diff-tree_--cc_--stat_--summary_master
+100644 50362be7bf851759885ad17847f5913e5dfb0b3c 0 t/t4013/diff.diff-tree_--cc_--stat_--summary_side
+100644 fae7f33255faef186aa7b987c29adfe33d0365f1 0 t/t4013/diff.diff-tree_--cc_--stat_master
+100644 5ecb4e14ae4718bb26dbe5657abd5660dc45914e 0 t/t4013/diff.diff-tree_--cc_master
+100644 fc177ab3f24c7eddc71d76b803515f7314d9b136 0 t/t4013/diff.diff-tree_--patch-with-raw_initial
+100644 bd905b1c573056f92d7f3b11ad4898d19fd0e5f8 0 t/t4013/diff.diff-tree_--patch-with-stat_initial
+100644 7bb8b45e3eea89b4015cabb70d34483352b40f1a 0 t/t4013/diff.diff-tree_--pretty=oneline_--patch-with-raw_initial
+100644 cbdde4f400fe96ea565dcf28b6b474c2218b6104 0 t/t4013/diff.diff-tree_--pretty=oneline_--patch-with-stat_initial
+100644 cd79f1a0ff23a4399416d85737f312e0b8652a38 0 t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial
+100644 d5c333a378c9407abf179d6cc3f5233ca8b5f116 0 t/t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
+100644 3c5092c6993f454dc7392a3846b93cc3fa47f7e5 0 t/t4013/diff.diff-tree_--pretty=oneline_--root_-p_initial
+100644 08920ac658b07ed83376bdd492020f7787ad1ad5 0 t/t4013/diff.diff-tree_--pretty=oneline_--root_initial
+100644 94b76bfef159a0d8e2d7c48194110cb8465545c2 0 t/t4013/diff.diff-tree_--pretty=oneline_-p_initial
+100644 d50970d5745278a47da683aa20968a912493cb01 0 t/t4013/diff.diff-tree_--pretty=oneline_initial
+100644 3a85316d8a3416e2f280e01d02e0bf3cfce13cc8 0 t/t4013/diff.diff-tree_--pretty_--patch-with-raw_initial
+100644 2e08239a46a72e76aad4e38940cdc822ca511793 0 t/t4013/diff.diff-tree_--pretty_--patch-with-stat_initial
+100644 4d30e7eddc05aa561b43519b031f89de8a30fd98 0 t/t4013/diff.diff-tree_--pretty_--patch-with-stat_side
+100644 a3203bd19bd74f1308ca75396fd9a3cfa2064ac8 0 t/t4013/diff.diff-tree_--pretty_--root_--patch-with-raw_initial
+100644 7dfa6af3c97b1ad469135bb9a9f3c1f8d6d4b60d 0 t/t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial
+100644 43bfce253eaf451e2f0a19042c9cbb8879c6fef1 0 t/t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial
+100644 9154aa4d4700b4a7c1e4c205f43694c198419ece 0 t/t4013/diff.diff-tree_--pretty_--root_--stat_initial
+100644 ccdaafb3772e80571441f5e4263f79a7b8bc5bfd 0 t/t4013/diff.diff-tree_--pretty_--root_--summary_-r_initial
+100644 58e5f74aeae880c69776bfa8e51bc9e5fe2463cf 0 t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
+100644 d0411f64ec5d104de3169da28453276880984917 0 t/t4013/diff.diff-tree_--pretty_--root_-p_initial
+100644 94e32eabb1f82eb614f1a92d64d0ada403a4df16 0 t/t4013/diff.diff-tree_--pretty_--root_initial
+100644 c22983ac4ae05a8c8d9591c91c0a44bc8f42052e 0 t/t4013/diff.diff-tree_--pretty_--stat_--summary_initial
+100644 8fdcfb4c0ad64bc92ddda2418cb5f7fa1138cc7a 0 t/t4013/diff.diff-tree_--pretty_--stat_initial
+100644 9bc2c4fbad20e42dd0a007eaa23c5994eb675588 0 t/t4013/diff.diff-tree_--pretty_--summary_initial
+100644 3c9942faf4b1a1e6d8c3bbbab5627a32ecc96be6 0 t/t4013/diff.diff-tree_--pretty_-p_initial
+100644 b993aa7b893c9ba6c276045a400fe0a849265fcd 0 t/t4013/diff.diff-tree_--pretty_-p_side
+100644 14715bf7d08ff7696da2572544092f6be9029e18 0 t/t4013/diff.diff-tree_--pretty_initial
+100644 e9b6e1c10211c4fb60262a55a28a503c3ed9bb47 0 t/t4013/diff.diff-tree_--pretty_side
+100644 5aa84b2a866262a4e6b2d496e7da5b6f7b9d4d88 0 t/t4013/diff.diff-tree_--root_--abbrev_initial
+100644 d295e475ddc626dc18381a5c5e839d3b2c26126e 0 t/t4013/diff.diff-tree_--root_--patch-with-raw_initial
+100644 1562b627085ff0ad8ffaea61cc42ed39a9d94fc8 0 t/t4013/diff.diff-tree_--root_--patch-with-stat_initial
+100644 3219c72fcbce5ee5a1c2b4e7bb87e696db9a0b18 0 t/t4013/diff.diff-tree_--root_-p_initial
+100644 0c5361688c54c2599e240252ce70e4fad457c924 0 t/t4013/diff.diff-tree_--root_-r_--abbrev=4_initial
+100644 c7b460faf6900e5730a08ab3b90bfda8e1ad48ca 0 t/t4013/diff.diff-tree_--root_-r_--abbrev_initial
+100644 eed435e175d40a3f6fa8b3a0a534936360e86eea 0 t/t4013/diff.diff-tree_--root_-r_initial
+100644 ddf6b068abe26f7516c37ceb1dca1d646343a499 0 t/t4013/diff.diff-tree_--root_initial
+100644 b8e4aa2530717abc7d7b8bea62f12d615dfcd759 0 t/t4013/diff.diff-tree_-c_--abbrev_master
+100644 ac9f641fb48272f25f3385dfbbd05777564f16bc 0 t/t4013/diff.diff-tree_-c_--stat_--summary_master
+100644 2afcca11f4d0c4db6e259e85540e4d90f8c76a10 0 t/t4013/diff.diff-tree_-c_--stat_--summary_side
+100644 c2fe6a98c5f9818f9caf5e0a314aee45831e5329 0 t/t4013/diff.diff-tree_-c_--stat_master
+100644 e2d2bb26114ac886fbf2467dc7a33ec8cfab5daf 0 t/t4013/diff.diff-tree_-c_master
+100644 b60bea039d991675e9d1480d5089c416aa68200a 0 t/t4013/diff.diff-tree_-p_-m_master
+100644 e20ce883702ae0e430350ae849b28c44a081487f 0 t/t4013/diff.diff-tree_-p_initial
+100644 b182875fb2fb3f0020dbf49fd9fd4c80e016e651 0 t/t4013/diff.diff-tree_-p_master
+100644 c5a3aa5aa4688cb354bff44cbb6062ef8259a617 0 t/t4013/diff.diff-tree_-r_--abbrev=4_initial
+100644 0b689b773c67dfef103d95c55ee9958f1b8f32ed 0 t/t4013/diff.diff-tree_-r_--abbrev_initial
+100644 1765d83ce461d78e59cf7d505ec63331a7c70577 0 t/t4013/diff.diff-tree_-r_initial
+100644 b49fc5345730346ab50142f55a1b8796545ead89 0 t/t4013/diff.diff-tree_initial
+100644 fe9226f8a12323c3a36ff2c0c2fd9938852575c8 0 t/t4013/diff.diff-tree_master
+100644 a88e66f81774579c511b6cd546f5043a9c975c36 0 t/t4013/diff.diff_--abbrev_initial..side
+100644 d0d96aaa91eec7f5a6cb833e43bbd3ec89efad98 0 t/t4013/diff.diff_--name-status_dir2_dir
+100644 6a47584777a65cff71e2ebfac8c8f12944de17bb 0 t/t4013/diff.diff_--no-index_--name-status_dir2_dir
+100644 3590dc79a65af7299c4b56fd632489920b62f0fb 0 t/t4013/diff.diff_--patch-with-raw_-r_initial..side
+100644 b21d5dc6f391fe977cc7c9b9c6badf9b261c5f72 0 t/t4013/diff.diff_--patch-with-raw_initial..side
+100644 9ed317a198c71fcec0b44a7b736b61550eed9394 0 t/t4013/diff.diff_--patch-with-stat_-r_initial..side
+100644 8b50629e668a385179eb9586b472c51237492232 0 t/t4013/diff.diff_--patch-with-stat_initial..side
+100644 0517b5d63129f44275b16f51819d9c08bf37d430 0 t/t4013/diff.diff_--stat_initial..side
+100644 245220d3f9b475b4281395639d85122feaa7948d 0 t/t4013/diff.diff_-r_--stat_initial..side
+100644 5bb2fe2f280d2def45c113b5c0daa7ab789faed0 0 t/t4013/diff.diff_-r_initial..side
+100644 c8adaf595863e66fb9ae061cd20176c981316372 0 t/t4013/diff.diff_initial..side
+100644 43346b9ba443fe22b56f0874a7cc885461d2aa81 0 t/t4013/diff.format-patch_--attach_--stdout_initial..master
+100644 d7490a9fd729890c80a4b8fc3da0783997f81a04 0 t/t4013/diff.format-patch_--attach_--stdout_initial..master^
+100644 38f790290a41311e490c493bdaf71774853cc861 0 t/t4013/diff.format-patch_--attach_--stdout_initial..side
+100644 fca5cce373767d96fd68a17a196889c8c9ea172f 0 t/t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
+100644 6d6fac390849c964e75b56e48808a78dd3428ce1 0 t/t4013/diff.format-patch_--inline_--stdout_initial..master
+100644 18a1110def4bbe25c0bd7020d35df589ef6f528f 0 t/t4013/diff.format-patch_--inline_--stdout_initial..master^
+100644 4f258b8858df79ecf475514b69df904e83e29ffa 0 t/t4013/diff.format-patch_--inline_--stdout_initial..master^^
+100644 e86dce69a3a78d5cfe5cd82067df0381b0f635bd 0 t/t4013/diff.format-patch_--inline_--stdout_initial..side
+100644 8dab4bf93ebd5f3e5ee6e899890d6e53af9ab967 0 t/t4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^
+100644 8b88ca49276695aead0083ad49c53715874e11dc 0 t/t4013/diff.format-patch_--stdout_initial..master
+100644 47a4b88637d4dc8650f0480278ae67b907eb5080 0 t/t4013/diff.format-patch_--stdout_initial..master^
+100644 e7650884755b993661ef14fbc812edd7c2710702 0 t/t4013/diff.format-patch_--stdout_initial..side
+100644 3ceb8e73c5d4e963a2c08eddf41197431ad52178 0 t/t4013/diff.log_--patch-with-stat_--summary_master_--_dir_
+100644 43d77761f988b7f43f46a5d8fd85d406ef9caa42 0 t/t4013/diff.log_--patch-with-stat_master
+100644 5187a26816723476b049c44bb3801816e8672cdf 0 t/t4013/diff.log_--patch-with-stat_master_--_dir_
+100644 c9640976a8f3bd724004f945b00d71f43f00c8ea 0 t/t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master
+100644 ad050af55ffa6983bc08ef5919dd20229584fd59 0 t/t4013/diff.log_--root_--patch-with-stat_--summary_master
+100644 628c6c03bc6195268c3e7e003478fd042ef36db2 0 t/t4013/diff.log_--root_--patch-with-stat_master
+100644 5d4e0f13b59652b170c0b2498319f970d071f774 0 t/t4013/diff.log_--root_-c_--patch-with-stat_--summary_master
+100644 217a2eb203718b91ccd79a04e0369f4c5d2905aa 0 t/t4013/diff.log_--root_-p_master
+100644 e17ccfc2340eadbb8c393de0aa2793f6f899ba56 0 t/t4013/diff.log_--root_master
+100644 5e3243897294d1fc4193c1de3fec95ce58ab22af 0 t/t4013/diff.log_-SF_-p_master
+100644 c1599f2f520090b0717d951a69ade5a9960f8038 0 t/t4013/diff.log_-SF_master
+100644 f8fefef2c3869337ba048d5cd6d95169dc60cf00 0 t/t4013/diff.log_-p_master
+100644 e9d9e7b40a08d803901ac001e4bf9f0c37ad8b15 0 t/t4013/diff.log_master
+100644 221b46a7cc2c174ec605cab02211de97bf84f010 0 t/t4013/diff.show_--patch-with-raw_side
+100644 377f2b7b7a34a1e83bbcf0f2d72981685a678c24 0 t/t4013/diff.show_--patch-with-stat_--summary_side
+100644 fb14c530d2dd79730320badff2547ebf755bd350 0 t/t4013/diff.show_--patch-with-stat_side
+100644 8c89136c4d84091da3f2b9f6eaf582112f90a9ba 0 t/t4013/diff.show_--root_initial
+100644 5bd597762869443cfd91ba8ebdaeff6e8b515ebf 0 t/t4013/diff.show_--stat_--summary_side
+100644 3b22327e48122187af12db46027f17526c8e9caf 0 t/t4013/diff.show_--stat_side
+100644 4c4066ae48e213b6a0f4bf51226c4322ac9348c4 0 t/t4013/diff.show_initial
+100644 9e6e1f27105ca50262e5eb3f2ff132b46c12fe45 0 t/t4013/diff.show_master
+100644 530a073b19d75e37aeb241200b6b306e6803ca09 0 t/t4013/diff.show_side
+100644 6a467cccc190449049b7baed2dde0a2f9027e663 0 t/t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_
+100644 1e1bbe19638eeeffb4e656239545ea91fda3dbf2 0 t/t4013/diff.whatchanged_--patch-with-stat_master
+100644 13789f169b6803ba71680470197c50b51795e4e4 0 t/t4013/diff.whatchanged_--patch-with-stat_master_--_dir_
+100644 5facf2543db0135ceb3aafdc5ffe0395b429f44c 0 t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
+100644 02911535870b012720c9ae095499c61e6e242c7e 0 t/t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master
+100644 9b0349cd555eb17836b8c056d7aae8cf1eabe537 0 t/t4013/diff.whatchanged_--root_--patch-with-stat_master
+100644 10f6767e498b0d5bdadd73067e4ef2dd5f028e89 0 t/t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
+100644 ebf1f0661e07bd06098d1609a5a22b8e9bbae436 0 t/t4013/diff.whatchanged_--root_-p_master
+100644 a405cb6138857d3a1bc1b590aa55565c34770e4c 0 t/t4013/diff.whatchanged_--root_master
+100644 f39da84822845984e0f431cf84e71fc48853a3c8 0 t/t4013/diff.whatchanged_-SF_-p_master
+100644 0499321d0ebf57fc2d583afd46ce7813a1ba9fde 0 t/t4013/diff.whatchanged_-SF_master
+100644 f18d43209c0a90d2d6fd474e849690f1b2120cfe 0 t/t4013/diff.whatchanged_-p_master
+100644 cd3bcc2c7269c17ff25504c8b7ca02b55ba8d8ed 0 t/t4013/diff.whatchanged_master
+100755 7fe853c20d1111e40371a3796d82bb8485f5ebcf 0 t/t4014-format-patch.sh
+100755 a27fccc8dce431169ce41f7137fb75f44149719c 0 t/t4015-diff-whitespace.sh
+100755 f07035ab7ec72557be7a0cba9ea286bcbaa79da9 0 t/t4016-diff-quote.sh
+100755 60dd2014d5ae5d5e9e168b8b60278d90ef93cc53 0 t/t4017-diff-retval.sh
+100755 e747e842272df5935f863f78ccfc3b311f64228b 0 t/t4017-quiet.sh
+100755 833d6cbcfc063f336d97689ae4e547cf5e956b69 0 t/t4018-diff-funcname.sh
+100755 0d9cbb62615c0d94da784f63907989988b0e8151 0 t/t4019-diff-wserror.sh
+100755 637b4e19d52e81cf1472a4ed9dcfb0c9ff00da2b 0 t/t4020-diff-external.sh
+100644 db2f89090c1c4de05e4f82ea39ea118fccfd48dd 0 t/t4020/diff.NUL
+100755 43d64bbd826049c5a0a8cf365ed5cb3f4489752c 0 t/t4021-format-patch-numbered.sh
+100755 ba43f185494630c50fc2a168df8dcd45c0b2421b 0 t/t4021-format-patch-signer-mime.sh
+100755 bf996fc414d3b5ea16488a8b274973a8347b29cb 0 t/t4022-diff-rewrite.sh
+100755 4dbfc6e8b751a6c93b1f9dfee8ce649235c98c93 0 t/t4023-diff-rename-typechange.sh
+100755 c4d733f5db6a4d390762505b770954cdbf6cc82f 0 t/t4024-diff-optimize-common.sh
+100755 7a3dbc1ea22fd19a54da8949abc368c112377b19 0 t/t4025-hunk-header.sh
+100755 b61e5169f4e9e8d9f87b9ea16e71dfcf1fb9f340 0 t/t4026-color.sh
+100755 ba6679c6e4032bb12e4206226f95770946ece8cc 0 t/t4027-diff-submodule.sh
+100755 204ba673cb58f905f2f35ff5b83294b2a2943f48 0 t/t4028-format-patch-mime-headers.sh
+100755 e0c67740a5ef85aaa3edc9a4514da72c92ce30ec 0 t/t4100-apply-stat.sh
+100644 540e64db85575e10fe02b3b85af6a353999aab8f 0 t/t4100/t-apply-1.expect
+100644 90ab54f0f586c87ace077be87fba396c8f2781a0 0 t/t4100/t-apply-1.patch
+100644 d1e6459749fe3dd4635c9136ccbb148a85405676 0 t/t4100/t-apply-2.expect
+100644 f5c7d601fc955b15d15012a5b49df83364b6ebf4 0 t/t4100/t-apply-2.patch
+100644 912a552a7a67be283c963da84bf044fa779fe633 0 t/t4100/t-apply-3.expect
+100644 90cdbaa5bb62a4adfa0a5eb3f6fe223b9de50e7b 0 t/t4100/t-apply-3.patch
+100644 1ec028b3d05d79fab29d2ac61027c8ef00bf8401 0 t/t4100/t-apply-4.expect
+100644 4a56ab5cf416e2144b5dbdbe06d10b51255fabe2 0 t/t4100/t-apply-4.patch
+100644 b387df15d4fc81574ac18f41174205c86a6ad503 0 t/t4100/t-apply-5.expect
+100644 5f6ddc105950eac20bcacb7987fabff015320ee3 0 t/t4100/t-apply-5.patch
+100644 1c343d459eb8fc129f53d3a13f0e0ffa79058139 0 t/t4100/t-apply-6.expect
+100644 a72729a712038dc64f55d154eb9a94713e3269c9 0 t/t4100/t-apply-6.patch
+100644 1283164d9909164c2428bc1a08cbff1d819fe71c 0 t/t4100/t-apply-7.expect
+100644 07c6589e74fa5afbff9bdfd8d7b7b41f873a005b 0 t/t4100/t-apply-7.patch
+100644 eef7f2e65cc3e2192935b9bde3ea001244b6db18 0 t/t4100/t-apply-8.expect
+100644 5ca13e65949047b5a1e8170422519cd69418da88 0 t/t4100/t-apply-8.patch
+100644 eef7f2e65cc3e2192935b9bde3ea001244b6db18 0 t/t4100/t-apply-9.expect
+100644 875d57d567e2b807587a7e4d2a9bb7771225e28c 0 t/t4100/t-apply-9.patch
+100755 da8abcf36418dbd2e9d8ec85871c245991f96fda 0 t/t4101-apply-nonl.sh
+100644 1010a88f4727373c20e7ab46515a79b9d3cd9675 0 t/t4101/diff.0-1
+100644 36460a243ac10e256df270cec10a7498a0a32009 0 t/t4101/diff.0-2
+100644 b281c43e5b5f4926e365cbd168e43420e8a4a63a 0 t/t4101/diff.0-3
+100644 f0a2e92770870d78d32bef7fe2ed63ad4ca105de 0 t/t4101/diff.1-0
+100644 2a440a5ce2adae53a23363a3cd3b6af5ff915fd0 0 t/t4101/diff.1-2
+100644 61aff975b69f49430ccb0b6ebd14193fd9f78b4e 0 t/t4101/diff.1-3
+100644 c2e71ee344d032ee38bf325099ed6386f180f287 0 t/t4101/diff.2-0
+100644 a66d9fd3a137b22edf5a49cf811970fc85c985d9 0 t/t4101/diff.2-1
+100644 5633c831de0bb2d5d482acc89c32bb3cb39d02d7 0 t/t4101/diff.2-3
+100644 10b1a41edf734aef77feb4a5f40cf358a8f48db3 0 t/t4101/diff.3-0
+100644 c799c60fb9d460ff24160082a9c1346c0751dd4b 0 t/t4101/diff.3-1
+100644 f8d1ba6dc24669ff19530e0d3ed064db2c8e7077 0 t/t4101/diff.3-2
+100755 d42abff1ad59343fa1c84bded9a82c3212370da0 0 t/t4102-apply-rename.sh
+100755 7da0b4bb8bfa96765b9f6eaa1693e2e24e82d335 0 t/t4103-apply-binary.sh
+100755 e7e2913de745cc9f7639103757933f6238fdd564 0 t/t4104-apply-boundary.sh
+100755 3266e394003958b62509b7bfe6652abd03fdfcb7 0 t/t4105-apply-fuzz.sh
+100755 ac58083fe224100987800e9b5ee3e388d9b4d97c 0 t/t4109-apply-multifrag.sh
+100644 1db5ff10501497459d07e227f02764576a6010e1 0 t/t4109/expect-1
+100644 bc52924112ba857784169157d3f650eb35a931ba 0 t/t4109/expect-2
+100644 cd2a475feb2280a24b05870c00f0693dd1de605b 0 t/t4109/expect-3
+100644 1d411fc3ccebe33ee086cfeaea7cea1beb041a6a 0 t/t4109/patch1.patch
+100644 8c6b06d536a06d786f0752ec2aa2a7fae22c8926 0 t/t4109/patch2.patch
+100644 d696c55a752ac61b86691192d46da2566e299830 0 t/t4109/patch3.patch
+100644 4b085909b160a093e9edb4f91de87f7637f218b5 0 t/t4109/patch4.patch
+100755 09f58112e0229a41ea2a5d2ea6e8c23d2523298d 0 t/t4110-apply-scan.sh
+100644 87cc493ec8a0f6f042a5df3c302433c6e45d8dd3 0 t/t4110/expect
+100644 56139080dc157ab9e58dec01399c40362a9e710e 0 t/t4110/patch1.patch
+100644 04974247ec927d9b25bf0b30c372e4669321dad0 0 t/t4110/patch2.patch
+100644 26bd4427f808bb1d0929833f2784e384e35ab961 0 t/t4110/patch3.patch
+100644 9ffb9c2d7ecd2e87eb3a92ed99be90beba3e16be 0 t/t4110/patch4.patch
+100644 c5ac6914f987d3a41266dca735d872e4c131d02c 0 t/t4110/patch5.patch
+100755 f9ad183758c28ff648890d1bd4bbd599562cd795 0 t/t4112-apply-renames.sh
+100755 66fa51591eb7ee8f102fd86e30e54af2da3ea310 0 t/t4113-apply-ending.sh
+100755 55334927abb33864a55f8ff49fd0c0c94a3c1769 0 t/t4114-apply-typechange.sh
+100755 9ace578f17a07aafc050ccaf935aef8a4a3cab4e 0 t/t4115-apply-symlink.sh
+100755 2298ece8019d79ef718ef658bdac74493d265b92 0 t/t4116-apply-reverse.sh
+100755 e9ccd161ee96a5bdbb4bf77de406ea51dacfb5de 0 t/t4117-apply-reject.sh
+100755 f92e259cc6f251ec6f89edee3fc16720f264d82f 0 t/t4118-apply-empty-context.sh
+100755 3c73a783a7e908070308fb1f972f6b5d152e12a4 0 t/t4119-apply-config.sh
+100755 83d4ba679850c2ae2548bcfcce3f22227fcde8c7 0 t/t4120-apply-popt.sh
+100755 aff551a1d787477eb2db34d96217f66ca03c435d 0 t/t4121-apply-diffs.sh
+100755 841773f75fc085d07836b39b3775f49bde5d8d19 0 t/t4122-apply-symlink-inside.sh
+100755 984157f03b9744aa491c888fab9e6aef95dfdc6b 0 t/t4123-apply-shrink.sh
+100755 85f3da2b98a881647837323e3af0378ce59a9db5 0 t/t4124-apply-ws-rule.sh
+100755 3b471b641ba2d3274dd1ab89948485ff8ce4dfdb 0 t/t4125-apply-ws-fuzz.sh
+100755 ceb6a79fe0c8ca5b26a9e148215556f2aa344eb9 0 t/t4126-apply-empty.sh
+100755 1f859dd908cb298bf89a13822e8fc19882060689 0 t/t4127-apply-same-fn.sh
+100755 2dd0c75f964b690977e40a3a8235cc324dc6826e 0 t/t4128-apply-root.sh
+100755 6e6aaf59364456e21bb1deda960edb5295a71131 0 t/t4150-am.sh
+100755 7d86cdff64522f588a3d3e781cf2b272087cfd88 0 t/t4151-am-abort.sh
+100755 b68ab11f2915789cd04ac6bd43363aeab2079198 0 t/t4200-rerere.sh
+100755 405b97119175a1c0fa75a9db30c6b1ab076cc44e 0 t/t4201-shortlog.sh
+100755 4c8af45f834d034529c2a627768a0a3e6f1aac8d 0 t/t4202-log.sh
+100755 e395ff4e341bacea21cc5cd909304b7bb4fcb044 0 t/t5000-tar-tree.sh
+100755 e9f3e72c7ee5584d956d46126956c641a7d53905 0 t/t5100-mailinfo.sh
+100644 f5892c9da73eae30d7629ca5e7f0ba6a4c621c73 0 t/t5100/0010
+100644 8c052777e0d216e84bb8464b1ceaff1bc7721154 0 t/t5100/info0001
+100644 49bb0fec85323c8c19182bc2a50ceb64ce8307fb 0 t/t5100/info0002
+100644 bd0d1221aa34973159390642efc67773a6bfef17 0 t/t5100/info0003
+100644 616c3092a28223d9aa1b3c68aa0bd49fc394dd85 0 t/t5100/info0004
+100644 46a46fc77283fe31bd583444f76ae2cb7085a35a 0 t/t5100/info0005
+100644 8c052777e0d216e84bb8464b1ceaff1bc7721154 0 t/t5100/info0006
+100644 49bb0fec85323c8c19182bc2a50ceb64ce8307fb 0 t/t5100/info0007
+100644 e8a295138317864b814b24af63ad3cf9c64cf79a 0 t/t5100/info0008
+100644 2a66321c8032cc0ee0cba25486e57f790d1f6ce8 0 t/t5100/info0009
+100644 1791241e46dc44994c58b365e339c093704a6006 0 t/t5100/info0010
+100644 b275a9a9b21c762814ed09c0d3a6eb103aa59370 0 t/t5100/msg0001
+100644 e2546ec7332b6b0483f4951906a40436da6383e0 0 t/t5100/msg0002
+100644 1ac68101b135f4aaf6dacd4bcc0b7586a29d6584 0 t/t5100/msg0003
+100644 6f8ba3b8e0e504d0aa343e45fffc044a211cc7ca 0 t/t5100/msg0004
+100644 dd94cd7b9f52247fd33a891e4fdd9b715c7f59b7 0 t/t5100/msg0005
+100644 b275a9a9b21c762814ed09c0d3a6eb103aa59370 0 t/t5100/msg0006
+100644 71b23c0236bddbedabfbdb982e4e73c5e266da28 0 t/t5100/msg0007
+100644 a80ecb97ef9dabb6d25d24d42212dabd5eab6249 0 t/t5100/msg0008
+100644 9ffe1314891f0998bf90f6c6b1e02c56c405e2f2 0 t/t5100/msg0009
+100644 a96c230092340037ef1c99ae91f24096eceacf44 0 t/t5100/msg0010
+100644 d7d680f631b14ea75adf34ba5052043be311e72f 0 t/t5100/nul-b64.expect
+100644 16540d961f8e6eb791300e085d2d6e82e01bd2c4 0 t/t5100/nul-b64.in
+100644 3d40691787b855cc0133514a19052492eb853d21 0 t/t5100/nul-plain
+100644 8ce155167d51de1868fdd2395c312c46b9cc2c63 0 t/t5100/patch0001
+100644 8ce155167d51de1868fdd2395c312c46b9cc2c63 0 t/t5100/patch0002
+100644 8ce155167d51de1868fdd2395c312c46b9cc2c63 0 t/t5100/patch0003
+100644 196458e44e1974188cc1d1523a92c2bbef1ed506 0 t/t5100/patch0004
+100644 7d24b24af83c861a1dc615c19cbaa392fdd69dec 0 t/t5100/patch0005
+100644 8ce155167d51de1868fdd2395c312c46b9cc2c63 0 t/t5100/patch0006
+100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 t/t5100/patch0007
+100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 t/t5100/patch0008
+100644 65615c34af6ea70a53102e6bbef4bd60344cbf1c 0 t/t5100/patch0009
+100644 f055481d567212b7b43e7ca8251351b3f83b143b 0 t/t5100/patch0010
+100644 aba57f922b33b6ab708afbbf82c7e56f6e37bb8d 0 t/t5100/sample.mbox
+100755 645583f9d729cb04ea7bd9638b0c49c48128822e 0 t/t5300-pack-object.sh
+100755 073ac0c6f9dd3d06474b1b81c8c7b622dcfee663 0 t/t5301-sliding-window.sh
+100755 0639772ac4e1e2c6563e793b16c2c10faf06758a 0 t/t5302-pack-index.sh
+100755 31b20b21d23c2066fd124bf6a33dbdc689930170 0 t/t5303-pack-corruption-resilience.sh
+100755 9fd9d0700033027921c90290cedc0a31d71c7733 0 t/t5304-prune.sh
+100755 fb471a08c698b431cd2440e9d4f0e77e2fef6b08 0 t/t5305-include-tag.sh
+100755 68c2ae688c2b7ff96ec927622f92fd512e7beefe 0 t/t5400-send-pack.sh
+100755 ee769d6695ee91120671c485924d804f14c80424 0 t/t5401-update-hooks.sh
+100755 1394047a8dc3e87476e223db42936d59845f803b 0 t/t5402-post-merge-hook.sh
+100755 823239a251f9ba9607649382d595db1b6cc6dcb2 0 t/t5403-post-checkout-hook.sh
+100755 c24003565d635722f07333bb662c8e102d577c9e 0 t/t5404-tracking-branches.sh
+100755 86abc6227105e27fdb9ad99e34193efb90a6242f 0 t/t5405-send-pack-rewind.sh
+100755 59e80a5ea253607bf83ac4eed670744df950eb81 0 t/t5406-remote-rejects.sh
+100755 362cf7e928090fb3752936317f78a4d128810127 0 t/t5500-fetch-pack.sh
+100755 16eadd6b68664884836976aafb6dcbb582603c09 0 t/t5502-quickfetch.sh
+100755 4074e23ffa2c7a93fdbd4a367e273118224b9038 0 t/t5503-tagfollow.sh
+100755 be9ee9326fc4590dcc875e31b6cf64b800451bc5 0 t/t5505-remote.sh
+100755 13d1d826c20293c26c739c70c0a36ed48bbb41d1 0 t/t5510-fetch.sh
+100755 22ba380034775e7584a33ca606294af34f568443 0 t/t5511-refspec.sh
+100755 1dd8eed5bb3cb0f320a8f0780452e52fa7d8da16 0 t/t5512-ls-remote.sh
+100755 9e7486274b3f0079cb993acbd03e90afc5638e38 0 t/t5513-fetch-track.sh
+100755 8becbc3f38fde02371ebbcd9a39a320a1c00c290 0 t/t5515-fetch-merge-logic.sh
+100644 2e0414f6c3d006ac6f06b884a13397c67f6b7df1 0 t/t5515/fetch.br-branches-default
+100644 ca2cc1d1b44e3edc8cd42e2e77d0f85658a52195 0 t/t5515/fetch.br-branches-default-merge
+100644 7d947cd80f9cf656024206f1ea31da0d9f10f493 0 t/t5515/fetch.br-branches-default-merge_branches-default
+100644 ec39c54b7e242ddbeec76f55b98f555d562aa271 0 t/t5515/fetch.br-branches-default-octopus
+100644 6bf42e24b67b526bac49e3cdb287e32513f4a6c4 0 t/t5515/fetch.br-branches-default-octopus_branches-default
+100644 4a2bf3c95ca474417d1dd54d1ac0bcc02bb5f402 0 t/t5515/fetch.br-branches-default_branches-default
+100644 12ac8d20fba1c8a9402b92aa71e2e6797101a042 0 t/t5515/fetch.br-branches-one
+100644 b4b3b35ce0e2f46a16b015a74b771eb90ed3ebad 0 t/t5515/fetch.br-branches-one-merge
+100644 2ecef384eb7d823104581bfe2b4bd240b449e5df 0 t/t5515/fetch.br-branches-one-merge_branches-one
+100644 96e3029416b46ab4192d3e4aaa285a02489e4054 0 t/t5515/fetch.br-branches-one-octopus
+100644 55e0bad621cde0c93e6a6fb92dc259c61986aba5 0 t/t5515/fetch.br-branches-one-octopus_branches-one
+100644 281fa09d481a2d04788d5c1b0a67b8f569203ebc 0 t/t5515/fetch.br-branches-one_branches-one
+100644 e2fa9c8654647e46baa89d24501b050209aefdc1 0 t/t5515/fetch.br-config-explicit
+100644 ec1a7231aa7875df2cebd32411bad4861c233dcd 0 t/t5515/fetch.br-config-explicit-merge
+100644 54f689151ff1006561309f6f7ca5e3523f8626c4 0 t/t5515/fetch.br-config-explicit-merge_config-explicit
+100644 7011dfc18140aade896592c853bec85567d4ccc8 0 t/t5515/fetch.br-config-explicit-octopus
+100644 bdad51f87163b51c378aaa1ca9bed8fe4a461af1 0 t/t5515/fetch.br-config-explicit-octopus_config-explicit
+100644 1b237dde6e03b9bb1f4b9ad0b5ab75ae31127b57 0 t/t5515/fetch.br-config-explicit_config-explicit
+100644 e75ec2f72b4420cf27bcb959ab83518d93e115b1 0 t/t5515/fetch.br-config-glob
+100644 ce8f739a0d5f53d24d1408e0e39719c0411e3c0d 0 t/t5515/fetch.br-config-glob-merge
+100644 5817bed8f88fcc11b9d5e67ce0863249339eeb2c 0 t/t5515/fetch.br-config-glob-merge_config-glob
+100644 938e532db25e684599b39d1c862680a1caf8ea23 0 t/t5515/fetch.br-config-glob-octopus
+100644 c9225bf6ff060118ae85b5c666085b3a558db16e 0 t/t5515/fetch.br-config-glob-octopus_config-glob
+100644 a6c20f92ce6e708f915b285310a94b7080eab1e3 0 t/t5515/fetch.br-config-glob_config-glob
+100644 83534d2ec85e30dee5c32b8d385dd717cf4930a2 0 t/t5515/fetch.br-remote-explicit
+100644 a9064dd65a0e569cc3e7ce5ae2368313f6bfa7ec 0 t/t5515/fetch.br-remote-explicit-merge
+100644 732a37e4d358f0239687770b28c109051c438070 0 t/t5515/fetch.br-remote-explicit-merge_remote-explicit
+100644 ecf020d9298e7a031833e9986f2deb787712cb89 0 t/t5515/fetch.br-remote-explicit-octopus
+100644 af7753101140d43e2a592ec37b88d57d53d45bde 0 t/t5515/fetch.br-remote-explicit-octopus_remote-explicit
+100644 51fae567c8765fc6f447d7ee93a9796e022663a5 0 t/t5515/fetch.br-remote-explicit_remote-explicit
+100644 94e6ad31e301a87b52160f2287b54051e27b4e18 0 t/t5515/fetch.br-remote-glob
+100644 09362e25af564342ccb5ed9507caa103676aedf6 0 t/t5515/fetch.br-remote-glob-merge
+100644 e2eabec62e12b29be2b8cd0c8e6d0cc9ad042f4d 0 t/t5515/fetch.br-remote-glob-merge_remote-glob
+100644 b08e0461954dcedc90df43c03302e3d4257c6f4b 0 t/t5515/fetch.br-remote-glob-octopus
+100644 d4d547c84733f0faacc85c88c7b7fa138933e4a6 0 t/t5515/fetch.br-remote-glob-octopus_remote-glob
+100644 646dbc877008edae3644ceef92fd5bed990eb784 0 t/t5515/fetch.br-remote-glob_remote-glob
+100644 65ce6d99e2631fd777de10e11b3a58db5859c29a 0 t/t5515/fetch.br-unconfig
+100644 8258c808689d883b97867b3d07ca89e08146de12 0 t/t5515/fetch.br-unconfig_--tags_.._.git
+100644 284bb1fb613cafff208741069aea2d4041ec07cd 0 t/t5515/fetch.br-unconfig_.._.git
+100644 11eb5a6ef22d52b794dd7a0a3e29d2ff515791c2 0 t/t5515/fetch.br-unconfig_.._.git_one
+100644 f02bab2fb4a1e07c6128fb899bf42183d1f0965e 0 t/t5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file
+100644 3f1be224b8b46ba18bb45ffdbc155d9bd312376c 0 t/t5515/fetch.br-unconfig_.._.git_one_two
+100644 85de41109ecfb6fd4ac3a1b3b15489b83506a63c 0 t/t5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file
+100644 0da2337f1b95b2011524b3d047a291747bd80305 0 t/t5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three
+100644 fc7041eefc2150417abc504e25f9d82049b3102e 0 t/t5515/fetch.br-unconfig_branches-default
+100644 e94cde745b58aeb360e2db064466260f2362cf87 0 t/t5515/fetch.br-unconfig_branches-one
+100644 01a283e70d9d10373c363d1fe15b39949bba8d89 0 t/t5515/fetch.br-unconfig_config-explicit
+100644 3a556c5e964785046cc43e9c13351818f436b857 0 t/t5515/fetch.br-unconfig_config-glob
+100644 db216dfa562e894999c565d44d43abb6c6dd562e 0 t/t5515/fetch.br-unconfig_remote-explicit
+100644 aee65c204d1b1468adaee9d41dc5c0a47a3ae999 0 t/t5515/fetch.br-unconfig_remote-glob
+100644 950fd078db7ccbe27825183cb0236a0dcc45139a 0 t/t5515/fetch.master
+100644 0e59950c7b5e18521b59a17d3aaddc3a314a6f9c 0 t/t5515/fetch.master_--tags_.._.git
+100644 66d1aaddae6cb34d83bbd0e728fbe89fd26227b1 0 t/t5515/fetch.master_.._.git
+100644 35deddbd2ca6c28c7a50dfc28c3da09b79b7b6a6 0 t/t5515/fetch.master_.._.git_one
+100644 82868524ca40041b243e146064f4451d6899f3c4 0 t/t5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file
+100644 35ec5782c8a6076a76cf314fb5021da8a641e782 0 t/t5515/fetch.master_.._.git_one_two
+100644 2e133eff296d291045e86fe6a8cba958106b9aae 0 t/t5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file
+100644 92b18b40ccc883bede4d2067aa4bf7a529d2f059 0 t/t5515/fetch.master_.._.git_tag_tag-one_tag_tag-three
+100644 603d6d23312b6a58d95a685803d8b19f0e0ac4e2 0 t/t5515/fetch.master_branches-default
+100644 fe9bb0b7982951ccf85934e42ff7c9620e2312b4 0 t/t5515/fetch.master_branches-one
+100644 4be97c75752571d46aef0283f164abea025a1be8 0 t/t5515/fetch.master_config-explicit
+100644 cb0726ff8d7ea9e801497b564b680710c2a273af 0 t/t5515/fetch.master_config-glob
+100644 44a1ca84296079356eabc3fd37d04529a3492409 0 t/t5515/fetch.master_remote-explicit
+100644 724e8db0a533248cab6784696c90db02ca1435f3 0 t/t5515/fetch.master_remote-glob
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default-merge
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default-merge_branches-default
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default-octopus
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default-octopus_branches-default
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-branches-default_branches-default
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one-merge
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one-merge_branches-one
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one-octopus
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one-octopus_branches-one
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-branches-one_branches-one
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit-merge
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit-merge_config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit-octopus
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit-octopus_config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-explicit_config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob-merge
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob-merge_config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob-octopus
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob-octopus_config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-config-glob_config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit-merge
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit-merge_remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit-octopus
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit-octopus_remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-explicit_remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob-merge
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob-merge_remote-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob-octopus
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob-octopus_remote-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-remote-glob_remote-glob
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.br-unconfig
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.br-unconfig_--tags_.._.git
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.br-unconfig_.._.git
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.br-unconfig_.._.git_one
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.br-unconfig_.._.git_one_two
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.br-unconfig_.._.git_tag_tag-one_tag_tag-three
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.br-unconfig_branches-default
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.br-unconfig_branches-one
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-unconfig_config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-unconfig_config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-unconfig_remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.br-unconfig_remote-glob
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.master
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.master_--tags_.._.git
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.master_.._.git
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.master_.._.git_one
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.master_.._.git_one_tag_tag-one_tag_tag-three-file
+100644 70962eaac152f7063e965da7c6a61abee410e0bc 0 t/t5515/refs.master_.._.git_one_two
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file
+100644 13e4ad2e4602154808a384fe298497b220ac9d6a 0 t/t5515/refs.master_.._.git_tag_tag-one_tag_tag-three
+100644 21917c1e5dba7133d451403984f754f445657908 0 t/t5515/refs.master_branches-default
+100644 8a705a5df252f6f9d4cd32b1557a221ca4f7dc6f 0 t/t5515/refs.master_branches-one
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.master_config-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.master_config-glob
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.master_remote-explicit
+100644 9bbbfd9fc5332911f35826763b821d2eeb758d6f 0 t/t5515/refs.master_remote-glob
+100755 f0030ad00e4a6478fcb3ccfc503e576bd58003bd 0 t/t5516-fetch-push.sh
+100755 ea49dedbf8867694d83cd550c8212ff107361920 0 t/t5517-push-mirror.sh
+100755 c6bc65faa06adeaced0733064fb09eb82add585e 0 t/t5518-fetch-exit-status.sh
+100755 997b2db827c4f37512c6b5d2f861e12105e2a32d 0 t/t5520-pull.sh
+100755 1a15817cd5f8e838812723ad14dbec59a108680c 0 t/t5530-upload-pack-error.sh
+100755 f8c17cd96cc86ca8f2db2ff51467f712d65f8956 0 t/t5540-http-push.sh
+100755 3c013e2b6aa5c659c80134baf43c99e0d89e2e38 0 t/t5600-clone-fail-cleanup.sh
+100755 d785b3df78e8507d81ffa03ff694846791edfc87 0 t/t5601-clone.sh
+100755 8367a6845f6ea3cdbc2f4f0e096144975fa3aef2 0 t/t5602-clone-remote-exec.sh
+100755 1c109160690d273451f7a089be42e45f36a3b5bb 0 t/t5700-clone-reference.sh
+100755 8dfaaa456e115e85e36c438bb998d8053534104e 0 t/t5701-clone-local.sh
+100755 328e4d9a339101d04bb22e441a8955f6c2e1f260 0 t/t5702-clone-options.sh
+100755 ef7127c1b3943a494692ac8027ec321608a31b9c 0 t/t5710-info-alternate.sh
+100755 f55627b641682e72d58a2282639ca589b38fa744 0 t/t6000lib.sh
+100755 b2131cdacd93e0b62f4ef8fdc62b6a81c6aef6fc 0 t/t6001-rev-list-graft.sh
+100755 8f5de097ecd703ae5f6f889ecb735f7277f361be 0 t/t6002-rev-list-bisect.sh
+100755 5daa0be8cc856bff513905bc6583854e0b5ae53a 0 t/t6003-rev-list-topo-order.sh
+100755 5dabf1c5e354c28cc593bd0ea8e4b0d5f0d56d67 0 t/t6004-rev-list-path-optim.sh
+100755 0b64822bf621dee5c9544f76013c0342412eaee6 0 t/t6005-rev-list-count.sh
+100755 9176484db2f78122f71c0f11889e01382effcfb9 0 t/t6006-rev-list-format.sh
+100755 4b8611ce2092f9062aeaeb62ce19a9121d5be537 0 t/t6007-rev-list-cherry-pick-file.sh
+100755 c4af9ca0a7edf6230dc6ca8ec10848545971fce7 0 t/t6008-rev-list-submodule.sh
+100755 c8a96a9a994badde602c8bf7a7decda048a00525 0 t/t6009-rev-list-parent.sh
+100755 b6e57b2426728cce308a57315247cd2a66cabf4a 0 t/t6010-merge-base.sh
+100755 e51eb41f4b9575d2b51d8d4d255ff5ab7a0889ad 0 t/t6011-rev-list-with-bad-commit.sh
+100755 a19d49de28c457d1a5726400d25c1f731506a05f 0 t/t6020-merge-df.sh
+100755 331b9b07d4eedb07377de605ebb87691427b7bb4 0 t/t6021-merge-criss-cross.sh
+100755 e3f7ae8120aa2a46b25dd3830597cb863a5f5e20 0 t/t6022-merge-rename.sh
+100755 f674c48cab3e80d63b5a5831c667b8e08b542905 0 t/t6023-merge-file.sh
+100755 65be95fbaaef4861189a7fc6b3a25bb6d7feb0a7 0 t/t6023-merge-rename-nocruft.sh
+100755 802d0d06ebddec9db6e3a109e689b3974f1e0ff1 0 t/t6024-recursive-merge.sh
+100755 fc58456a11eef7ecb4cf60d37a9e9d5cbe13f970 0 t/t6025-merge-symlinks.sh
+100755 56fc34176859b81137b4d88af90398b9a74a18f7 0 t/t6026-merge-attr.sh
+100755 92ca1f0f8ccabe6f01159ea3e4a73683387ec4a3 0 t/t6027-merge-binary.sh
+100755 f8f3e3ff2c00df468f5703a4e0ac31f52e42e06d 0 t/t6028-merge-up-to-date.sh
+100755 5bbfa44e8d9ee3eebb18eb07e93380c802741a18 0 t/t6029-merge-subtree.sh
+100755 244fda62a5cd34d778cf0789961654eaa37fe589 0 t/t6030-bisect-porcelain.sh
+100755 8073e0c3efb2ac01e4a81e722fc357bcab13f5d4 0 t/t6031-merge-recursive.sh
+100755 eac5ebac24a0174fa20625a19835861573147a26 0 t/t6032-merge-large-rename.sh
+100755 75d9602de4d4238b4182956127540525f711d33f 0 t/t6033-merge-crlf.sh
+100755 aac212e936331db9a596fda0c4a9c0382e123797 0 t/t6040-tracking-info.sh
+100755 919552a2fc5544c130268befca322a6e6a8081c3 0 t/t6101-rev-parse-parents.sh
+100755 2fb672c3b43a9efe4cb9c85465f6b33f23724e48 0 t/t6120-describe.sh
+100755 bc74349416d858834c43f6c648daa95c8b9f3a7a 0 t/t6200-fmt-merge-msg.sh
+100755 a3c8941c726d77fd993a3cfcd7fde4e9aa43da74 0 t/t6300-for-each-ref.sh
+100755 910a28c7e29b6dd8bd30d1ccb156681b44e51bca 0 t/t7001-mv.sh
+100755 c8b4f65f380f3941c75bd6ed52975777d2b28d67 0 t/t7002-grep.sh
+100755 a0ab096c8fdee153a89a1428f85c9bf107badada 0 t/t7003-filter-branch.sh
+100755 bc7ce2cbbb712f890245688da03be96146a1d9ed 0 t/t7004-tag.sh
+100644 83855fa4e1c6c37afe550c17afa1e7971042ded5 0 t/t7004/pubring.gpg
+100644 8fed1339ed0a744e5663f4a5e6b6ac9bae3d8524 0 t/t7004/random_seed
+100644 d831cd9eb3eee613d3c0e1a71093ae01ea7347e3 0 t/t7004/secring.gpg
+100644 abace962b8bf84be688a6f27e4ebd0ee7052f210 0 t/t7004/trustdb.gpg
+100755 2d919d69ef110408b820c76185d6b8da63ea183e 0 t/t7005-editor.sh
+100755 d8a7c798525728ddc8fc5fa9bd8335d8d1f0a710 0 t/t7010-setup.sh
+100755 0d9874bfd7082f9ef16c1f6b3ff8a848a19d8937 0 t/t7101-reset.sh
+100755 29f5678b4c93485ad492fa865a5da58a3cc05b7c 0 t/t7102-reset.sh
+100755 cdecebe456c7a9cf30465b112a24ce7bcf76f344 0 t/t7103-reset-bare.sh
+100755 f136ee7bb5300966c0c3c9d2250dc81763db9feb 0 t/t7104-reset.sh
+100755 9ad5d635a2881c920fff8e524aea0ed931f68e6c 0 t/t7201-co.sh
+100755 2b51c0d7d8ab727a5fb0be8338938f1d3b2eb6a3 0 t/t7300-clean.sh
+100755 cbc0c34ce2487959ef0e8f89f7c2a5d4a68be826 0 t/t7400-submodule-basic.sh
+100755 bf12dbdeef6e307850a91eb6be5ebe537b2de0c8 0 t/t7401-submodule-summary.sh
+100755 f919c8d34de41b2ec3fe08c217dd2c6276cf8472 0 t/t7402-submodule-rebase.sh
+100755 d89f91a6fb7fa12d41cc4a346829bff7cbd3e76b 0 t/t7500-commit.sh
+100755 a72e65c8910f71b8ea562ef5ed641c54fbd89a8e 0 t/t7500/add-comments
+100755 2fa3d86a108d1fc410d82173809066db0b32b062 0 t/t7500/add-content
+100755 e1d856af6d8b59fed20e3beb272006612ba4e8a5 0 t/t7500/add-signed-off
+100755 0edd9ddf73b7053c21595ce1ac1dd157c77d1bca 0 t/t7501-commit.sh
+100755 f1112639b698faca38b2c8fc743e422d14dc15f6 0 t/t7502-commit.sh
+100755 38a48b57c70a888838cfa114be843e1d4aea00d8 0 t/t7502-status.sh
+100755 b06909599564a1c8afa027b0f9c71ef6bb61d6e4 0 t/t7503-pre-commit-hook.sh
+100755 47680e6df41c2bc14f23514b010a8aefb3fedcd7 0 t/t7504-commit-msg-hook.sh
+100755 cd6c7c834218fd4c46c49396b79da1ddeef42772 0 t/t7505-prepare-commit-msg-hook.sh
+100755 a75130cdbb55be157c915f4fc1397227a78441ec 0 t/t7506-status-submodule.sh
+100755 5eeb6c2b2708d582a6e86cd2e06e2b00b7b7b391 0 t/t7600-merge.sh
+100755 55aa6b5f2716255b2b5aa74f1cac9d285de6d6a8 0 t/t7601-merge-pull-config.sh
+100755 fcb8285746420ed721713d9c8e527d23cafb05cf 0 t/t7602-merge-octopus-many.sh
+100755 17b19dc11f2b1a5d26a16f447733880f3cf30d26 0 t/t7603-merge-reduce-heads.sh
+100755 6081677d234f1fcb88b6b9160f707ebf0274f38a 0 t/t7604-merge-custom-message.sh
+100755 ee21a107fd99e35b9d6325a040b7549b7a6c2502 0 t/t7605-merge-resolve.sh
+100755 9285071c473dcfe7d37845d01ba20226b5ab585d 0 t/t7610-mergetool.sh
+100755 31c340fd389ed2688bb94a29acbf892be6f0c564 0 t/t7701-repack-unpack-unreachable.sh
+100755 eabec2e06e2f97fc1790cd4ce30a80e402d4a205 0 t/t8001-annotate.sh
+100755 92ece30fa94784bdad8ae50fc370487e60bbcb5c 0 t/t8002-blame.sh
+100755 966bb0a61a89ed63dec085338d3c45f766a7f777 0 t/t8003-blame.sh
+100755 ba19ac127e630c01e009fa6eda1fac0086d7184d 0 t/t8004-blame.sh
+100755 1c857cf4ab6e359d7009d2c6b5018bb61c916e93 0 t/t9001-send-email.sh
+100755 843a5013b96c675a629bd7f738eca220861e6ff8 0 t/t9100-git-svn-basic.sh
+100755 f420796c31db2746b71ba9d7090f37363eba214a 0 t/t9101-git-svn-props.sh
+100755 0e7ce34b9b1e254873a2700cf58095318b49b15c 0 t/t9102-git-svn-deep-rmdir.sh
+100755 9ffd8458ef9d58fa5d3c42fd61f4629219b4d80a 0 t/t9103-git-svn-tracked-directory-removed.sh
+100755 4d964e2db7cc3c96fc64911bd58c4f2f9679a6cd 0 t/t9104-git-svn-follow-parent.sh
+100755 63230367bb1566384e66e1b5ddd6a68e1ae98c8f 0 t/t9105-git-svn-commit-diff.sh
+100755 83896e96876d8cca24496c7cb278732a308e3d92 0 t/t9106-git-svn-commit-diff-clobber.sh
+100755 bc37db9d62071ba92463276524675964c3e91593 0 t/t9106-git-svn-dcommit-clobber-series.sh
+100755 d9b553ad55b1f7024af0689a450a9c6c65dcb034 0 t/t9107-git-svn-migrate.sh
+100755 f6f71d0545c869a7216eb0e81f260085f6ffdec1 0 t/t9108-git-svn-glob.sh
+100755 04d2a65c087de78fa8126b68774673532497276e 0 t/t9110-git-svn-use-svm-props.sh
+100644 cc799c238de91a2b466735d678a0bc7415ebefc2 0 t/t9110/svm.dump
+100755 a8d74dcd3aba7c462d46ea33c722d4307d24bded 0 t/t9111-git-svn-use-svnsync-props.sh
+100644 499fa9594fafe5d45a32005c189634b6a3048777 0 t/t9111/svnsync.dump
+100755 d470a920e4864ab0c494da1261fe835ff80474eb 0 t/t9112-git-svn-md5less-file.sh
+100755 8da8ce58eb1b29210a6ac95fdd3a3fcb547ca36f 0 t/t9113-git-svn-dcommit-new-file.sh
+100755 61d7781616eed4374c014cabd75a297c2baa348d 0 t/t9114-git-svn-dcommit-merge.sh
+100755 f0fbd3aff7e63f64f8ba388db805013c43b4b22c 0 t/t9115-git-svn-dcommit-funky-renames.sh
+100644 42422f791ea4240495e0b9cb5173bb7a27989958 0 t/t9115/funky-names.dump
+100755 4b2cc878f685e65b2ccd5d8153efb533320d6ee9 0 t/t9116-git-svn-log.sh
+100755 7a689bb1cd1d9daa1f17c0dcaaafa4d68ebd78fa 0 t/t9117-git-svn-init-clone.sh
+100755 3281cbd3472a8da58c4f6f0f3965b5810705b0e9 0 t/t9118-git-svn-funky-branch-names.sh
+100755 cc619115931cb74a85a171ade915ca2c47639c9b 0 t/t9119-git-svn-info.sh
+100755 5979e133b9d5b9d85ddca31a40763ed4fb6feba3 0 t/t9120-git-svn-clone-with-percent-escapes.sh
+100755 99230b08107102836f752c14e1b0a67804b35ea3 0 t/t9121-git-svn-fetch-renamed-dir.sh
+100644 5f9127be92616ea8fb8ace1cff80a37037cb15ec 0 t/t9121/renamed-dir.dump
+100755 1190576a658d08a680e177b748cfc5e69caa3ddb 0 t/t9122-git-svn-author.sh
+100755 c18878fad16a6565fe846cc958417fea73289dce 0 t/t9123-git-svn-rebuild-with-rewriteroot.sh
+100755 8223c5909e6ff6936cb0ccf4d0badfe43491af46 0 t/t9124-git-svn-dcommit-auto-props.sh
+100755 3e32e84e6cd32413f98b5189f869bfb8f0a7f354 0 t/t9200-git-cvsexportcommit.sh
+100755 1fc06c5a23b50d54c33755a9fce4ddd9ed3b9c79 0 t/t9300-fast-import.sh
+100755 c19b4a2bab586b21da43c7a838ba85626f913568 0 t/t9301-fast-export.sh
+100755 4b91f8d4c45dad075d69028c9c70aa9cb1959e2b 0 t/t9400-git-cvsserver-server.sh
+100755 e27a1c5f85bbecac652ce8d224f8fc5e99b02a4e 0 t/t9401-git-cvsserver-crlf.sh
+100755 ae7082be1d903e1f4d5758610d5166152f2847cc 0 t/t9500-gitweb-standalone-no-errors.sh
+100755 0d7786a8c730d17fa194346f1da2978d23256da9 0 t/t9600-cvsimport.sh
+100755 9706ee5773692bd8fcfbc9015ef062947c0a2da5 0 t/t9700-perl-git.sh
+100755 4d2312548a81762918ac05b9a0014195b08ea532 0 t/t9700/test.pl
+100644 11c027571b44c429b4f6fdca88bff9c3360c7545 0 t/test-lib.sh
+100644 7b181d15cebb4c86a6ad7fed3dbf30ce2223b4c5 0 t/test4012.png
+100644 7b181d15cebb4c86a6ad7fed3dbf30ce2223b4c5 0 t/test9200a.png
+100644 ac22ccbd3ee9f03a3b38249ac8efdbe96b5da2cd 0 t/test9200b.png
+100644 4470d2bf78e1fbb00d00e487f41daa4373cf48e1 0 tag.c
+100644 7a0cb0070d46ba8c49d71029dc0704188805ea62 0 tag.h
+100644 3467705e9b0e14a0230473186079e83a582e4345 0 tar.h
+100644 6759ecbf98f8a90d96b4918c130babdd87889f69 0 templates/.gitignore
+100644 9f3f1fc352dea624bd36e55802de190ead0ad9dd 0 templates/Makefile
+100644 fae88709a636f3a06cc813dd64b28bfee7fa2073 0 templates/branches--
+100755 8b2a2fe84feaeaba56953d6d4d0d649b3cf755eb 0 templates/hooks--applypatch-msg.sample
+100755 6ef1d29d09a10a5b6c3cbec0ac481931cd0d85fc 0 templates/hooks--commit-msg.sample
+100755 22668216a3cec5a00d804dc5e9a904a10fd0fd09 0 templates/hooks--post-commit.sample
+100755 18d2e0f72768c103d593cc2cf6d2b7a4bc8a9a01 0 templates/hooks--post-receive.sample
+100755 5323b56b81b9dd3d7f9fb86d8892241becbb5e7e 0 templates/hooks--post-update.sample
+100755 b1f187c2e9acaba942639bca90a63c5b4f058967 0 templates/hooks--pre-applypatch.sample
+100755 0e49279c7f7b805c78f1bc4760a0d1c70a84a0d9 0 templates/hooks--pre-commit.sample
+100755 be1b06e25043146f22261b55548229e6ab524b7c 0 templates/hooks--pre-rebase.sample
+100755 365242499dcf0ee35c26ccb2917724d6e559be69 0 templates/hooks--prepare-commit-msg.sample
+100755 93c605594fc06683088b934273873165215ccbb5 0 templates/hooks--update.sample
+100644 2c87b72dff61f8394b3f1f32e21c1d936314ec2e 0 templates/info--exclude
+100644 c6f25e80b8bcf0a21db2bea368b9e444c19bc0bf 0 templates/this--description
+100644 90da448ebec3e5375b7725ba7f297c1c74199b87 0 test-chmtime.c
+100644 62e8f2387a1cab97ec1c71d1993d082274e17bf5 0 test-date.c
+100644 3d885ff37ee7fc43dec05dd827679d68cee5516b 0 test-delta.c
+100644 8cefe6cfed87c8fe0c11d1263dae01639d2bd0f0 0 test-genrandom.c
+100644 a3c4688778d9db28c83c9149c9cff1609b69b93f 0 test-match-trees.c
+100644 2a79e729a4018ddb2da9ff633f4bf3b102fa8f88 0 test-parse-options.c
+100644 a0bcb0e210523124fa977c8bf46667cf25d0335f 0 test-path-utils.c
+100644 78d7e983a7a05ba0652132425a66477ef5773304 0 test-sha1.c
+100755 0f0bc5d02f4dcbd67c6d405350e5aaeb39f44bfb 0 test-sha1.sh
+100644 55e7e2904eb5f95cedaec2520ddd1d158ee93c7a 0 thread-utils.c
+100644 cce4b77bd6452e2ec589d8c0dc0e8156352dd67b 0 thread-utils.h
+100644 4713f9165c54405d51e81c3e90847120ee907e5d 0 trace.c
+100644 6eb65b873afc9dfd457e974b63d88350bb8dc913 0 transport.c
+100644 d0b52053fff9bc463438674232bffb6024f3b1fc 0 transport.h
+100644 bbb126fc46cfb28a0bc92cc0842c0dc72017751d 0 tree-diff.c
+100644 02e2aed7737207225f1b96eed774a1b75dd6d8d9 0 tree-walk.c
+100644 42110a465f9a8c91d1bc643dfae7a9b9c32e3719 0 tree-walk.h
+100644 03e782a9cabc0a12ed5baec0ef59c99f19dbc843 0 tree.c
+100644 2ff01a4f839ecc2206fcc1c13fee9d5d202b1128 0 tree.h
+100644 bcdc8bbb3b44a43aa43db6035a31478158e070af 0 unpack-file.c
+100644 cba0aca062f201c5cd5f8799f2190d4a6f06e7c7 0