summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 4.3.0-SNAPSHOT buildsMatthias Sohn2016-01-2146-257/+257
| | | | | Change-Id: Idcf0479529693b023042becd96698f9afd344bd4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.2'Matthias Sohn2016-01-2111-1371/+1443
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: BundleWriterTest: Open RevWalk in try-with-resource DiffFormatterTest: Remove accidentally added trailing whitespace CherryPickCommandTest: Create Git instances in try-with-resource DiffFormatterTest: Create auto-closeable instances in try-with-resource ConfigTest: Create Git instance in try-with-resource CommitAndLogCommandTest: Use assumeFalse to skip test on Windows CommitAndLogCommandTest: Create Git instances in try-with-resource AddCommandTest: Create Git instances in try-with-resource ArchiveCommandTest: Create Git instances in try-with-resource TagCommandTest: Instantiate Git and RevWalk objects in try-with-resource BlameCommandTest: Instantiate Git objects in try-with-resource SideBandOutputStreamTest: Use try-with-resource FileTreeIteratorJava7Test: Create Git instances in try-with-resource Change-Id: Ib572e98e6117b70442aee9cd7e7b8c3cf65562a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * BundleWriterTest: Open RevWalk in try-with-resourceDavid Pursehouse2016-01-211-18/+20
| | | | | | | | | | Change-Id: Ie25770a73b19d6522bad9fdc0966f48370f96265 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * DiffFormatterTest: Remove accidentally added trailing whitespaceDavid Pursehouse2016-01-211-2/+2
| | | | | | | | | | Change-Id: Ia7a3b05b79c3a5530a4445e6e48ceae445425224 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * CherryPickCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-211-191/+197
| | | | | | | | | | Change-Id: I9d49258bdf12f3221013c37cfb8a21ea27f28860 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * DiffFormatterTest: Create auto-closeable instances in try-with-resourceDavid Pursehouse2016-01-211-78/+82
| | | | | | | | | | | | | | | | Git, ByteArrayOutputStream, and DiffFormatter are auto-closeable and should be managed in try-with-resource. Change-Id: I83395116acb4b4f7cd4300fd69564355bc07e4bb Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * ConfigTest: Create Git instance in try-with-resourceDavid Pursehouse2016-01-211-1/+3
| | | | | | | | | | Change-Id: Ie65c69e0f1aed95bcdf68ebd68d21b3e2590b41c Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * CommitAndLogCommandTest: Use assumeFalse to skip test on WindowsDavid Pursehouse2016-01-211-2/+2
| | | | | | | | | | | | | | | | Use JUnit's assumeFalse method to cause the test to skip when run on Windows. Change-Id: I3f59440cfe62c37c127e381052b60471fbe8ec5e Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * CommitAndLogCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-211-250/+256
| | | | | | | | | | Change-Id: Id06417f1d3914cd3addacdbe9b5801a06cc3955f Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * AddCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-211-306/+327
| | | | | | | | | | Change-Id: Idf42f03099eeb9975fef9492ea8a75776afc2a3c Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * ArchiveCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-211-85/+89
| | | | | | | | | | Change-Id: Icbfd92395db85818736142fd3fb3432385e89ca9 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * TagCommandTest: Instantiate Git and RevWalk objects in try-with-resourceDavid Pursehouse2016-01-201-101/+115
| | | | | | | | | | Change-Id: I08959650e2970e964bc864dc6d120d7bddfd8232 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * BlameCommandTest: Instantiate Git objects in try-with-resourceDavid Pursehouse2016-01-201-303/+305
| | | | | | | | | | Change-Id: Icb9e6bb9ee99589fa2e0388c8b305a8a1f5954db Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * SideBandOutputStreamTest: Use try-with-resourceDavid Pursehouse2016-01-201-11/+16
| | | | | | | | | | | | | | | | | | | | | | Factor out the creation of the SideBandOutputStream objects into a utility method that wraps it in a try-with-resource. Remove the "unused" suppression that is now unnecessary, and add declaration that the tests methods can throw Exception. Change-Id: Iff02e4e3532bd6ab6e423f197e70d44c4f328d0b Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * FileTreeIteratorJava7Test: Create Git instances in try-with-resourceDavid Pursehouse2016-01-201-32/+38
| | | | | | | | | | Change-Id: I493e90e8a0d96db5acc49759c8e138b0a8c7b099 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* | Add progress monitor to MergerLaurent Delaigue2016-01-215-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | Monitoring progress of merges can be useful for users for large repositories or complex merge processes that take some time. This enables setting a monitor. Existing merge implementations in jgit do not yet report progress if a monitor is set. This will be added in a later change. Change-Id: I17b978b3fc91750dd88649638b90a46820a0877c Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Fix unused throws CorruptObjectException from addTree"Shawn Pearce2016-01-212-4/+2
|\ \
| * | Fix unused throws CorruptObjectException from addTreeShawn Pearce2016-01-202-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2262a794b48ea removed throws CorruptObjectException, but was not compiled under Eclipse and did not see errors generated by Eclipse. Maven build silently ignored the unnecessary code. Change-Id: I6e9014adcc604588e10e5963d13d0c6ef0e1c617
* | | Merge "Fix TransportException when reading bundle"Shawn Pearce2016-01-211-10/+17
|\ \ \ | |/ / |/| |
| * | Fix TransportException when reading bundleChris Gavin2016-01-211-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading a bundle file, commit messages who's oneline format is longer than 982 characters caused JGit to treat subsequent text in the commit as a SHA, then throw a TransportException because it's not a valid SHA. Now the readLine method will read all the way to the end of the line, not just the first 1024 characters of it. Change-Id: If15b491aa9a1e4fd9b8bbed2dd9e6be47a64ccb7 Signed-off-by: Chris Gavin <chris@chrisgavin.me>
* | | Merge changes from topic 'reftree'Shawn Pearce2016-01-217-48/+243
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: debug-rebuild-ref-tree: Copy HEAD into RefTree debug-rebuild-ref-tree: Add --enable flag to turn the database on RefTreeDatabase: Allow ORIG_HEAD, etc. on non-bare repositories RefTreeDatabase: Expose bootstrap refs in getAdditionalRefs
| * | | debug-rebuild-ref-tree: Copy HEAD into RefTreeShawn Pearce2016-01-151-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HEAD is not part of getRefs(ALL) and must be copied explicitly. This allows `jgit debug-rebuild-ref-tree --enable` to convert an existing repository to use RefTree with a local working tree: mkdir testRepo cd testRepo jgit init jgit debug-rebuild-ref-tree --enable touch a jgit add a jgit commit -m initial Change-Id: I46cbc2611b9ae683ef7319dc46af277925dfaee5
| * | | debug-rebuild-ref-tree: Add --enable flag to turn the database onShawn Pearce2016-01-151-0/+14
| | | | | | | | | | | | | | | | Change-Id: Iad8ebdb0c4c0ad6dcd2b12dd56ffe1be6a20840f
| * | | RefTreeDatabase: Allow ORIG_HEAD, etc. on non-bare repositoriesShawn Pearce2016-01-153-3/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Store these in the bootstrap layer where they are using $GIT_DIR as the storage directory for any reference that does not contain '/'. Change-Id: I5595bf514e4475b7c7e799c2c79446597a3abb4a
| * | | RefTreeDatabase: Expose bootstrap refs in getAdditionalRefsShawn Pearce2016-01-155-41/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By showing the bootstrap layer in getAdditionalRefs() garbage collector code can be more RefDatabase agnostic and not care about the special case of RefTree and RefTreeNames for the purposes of building up the roots to GC. Instead they can combine getRefs(ALL) and getAdditionalRefs() and have a clean set of roots. Change-Id: I665cd2456e9316640215b6a08bc728d1356f36d8
* | | | Merge changes from topic 'ketch'Shawn Pearce2016-01-2027-1/+5022
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: daemon: Add --ketch=LEADER flag Ketch: Intercept push and route it through Ketch Ketch: Simple map of running leader instances Ketch: Basic replication system
| * | | | daemon: Add --ketch=LEADER flagShawn Pearce2016-01-195-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Experimental flag to turn on the KetchLeader within this daemon JVM. This is a manually elected leader process, set from the command line. Remote followers for each repository are configured per-repository using remote sections with ketch-type = FULL. For example: Manually elected leader's $GIT_DIR/config: [ketch] name = A [remote "A"] ketch-type = FULL [remote "B"] url = git://127.0.0.1:9421/sample.git ketch-type = FULL [remote "C"] url = git://127.0.0.1:9422/sample.git ketch-type = FULL Replica B and C daemons: git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9421 \ --base-path=$HOME/ketch_test/follower_one \ $HOME/ketch_test/follower_one & git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9422 \ --base-path=$HOME/ketch_test/follower_two \ $HOME/ketch_test/follower_two & Change-Id: I165f85970a77e16b5263115290d685d8a00566f5
| * | | | Ketch: Intercept push and route it through KetchShawn Pearce2016-01-194-1/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Capture commands and pass to the in-process KetchLeader, allowing it to replicate to followers. Change-Id: I25dfeb2a93821af65354337f391480a72bae2210
| * | | | Ketch: Simple map of running leader instancesShawn Pearce2016-01-191-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supports use in basic daemons where RepositoryCache is also effective. Change-Id: Ia736b32c2c710b5a802233badc0d30818de763cd
| * | | | Ketch: Basic replication systemShawn Pearce2016-01-1922-0/+4672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git Ketch is a multi-master Git repository management system. Writes are successful only if a majority of participant servers agree. Acked writes are durable against server failures as a majority of the participants store all required objects. Git Ketch is modeled on the Raft Consensus Algorithm[1]. A ketch sailing vessel is faster and more nimble than a raft. It can also carry more source codes. Git Ketch front-loads replication costs, which vaguely resembles a ketch sailing vessel's distinguishing feature of the main mast on the front of the ship. [1] https://raft.github.io/ Change-Id: Ib378dab068961fc7de624cd96030266660b64fb4
* | | | | Merge "TreeWalk: Remove CorruptObjectException from ↵Shawn Pearce2016-01-201-10/+5
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | addTree(AbstractTreeIterator)"
| * | | | TreeWalk: Remove CorruptObjectException from addTree(AbstractTreeIterator)Shawn Pearce2016-01-201-10/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This form of addTree() does not parse any objects and cannot throw the declared checked exception. Callers are being forced to try-catch CorruptObjectException that cannot occur when the iterator instance has already been constructed. Change-Id: Id338035302903bab81569d1576eab063eee0885a
* | | | Fix ResetCommand to return the resulting refChristian Halstrick2016-01-202-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ResetCommand was not returning the updated ref as a result of the call() method. Since the ResetCommand is always updating the same ref (HEAD) this should always be the HEAD ref. Bug: 440750 Change-Id: I7974975c3ab05e68c208384e69cf0692ded6e8db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Add option to allow empty commits to CommitCommandChristian Halstrick2016-01-203-0/+135
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CommitCommand should allow to specify whether empty commits (commits having the same tree as the sole predecessor commit) are allowed or not. Similar to native git's "--allow-empty" flag. The defaults differ between JGit and native git even after this change. When not specifying paths then by default JGit allows to create empty commits while native git does not. It would be API breaking to change this now. Bug: 460301 Change-Id: I88feb0c3ffb2c686b1d0594e669729b065cda4cb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Remove declared IOException which is no longer thrown"Matthias Sohn2016-01-192-4/+2
|\ \ \
| * | | Remove declared IOException which is no longer thrownMatthias Sohn2016-01-202-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2ccea7f0 ChangeIdUtil.computeChangeId() doesn't throw IOException anymore. Change-Id: I0bf43f2346dadbbfe7e6cbcb38b5525456fbf686 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge branch 'stable-4.2'David Pursehouse2016-01-2029-496/+508
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: CheckoutCommandTest: Create Git instances in try-with-resource BranchCommandTest: Create Git instances in try-with-resource CheckoutTest: Create Git instances in try-with-resource BranchTest: Create Git instances in try-with-resource URIishTest: Use @Test annotation's `expected` argument Suppress "The allocated object is never used" warning in tests Add $NON-NLS to suppress "Non-externalized string literal" warnings Don't use deprecated constructors of CmdLineException Prepare 4.2.0-SNAPSHOT builds Remove org.eclipse.jgit.updatesite project from tools/version.sh RevParse: Remove superfluous semicolon RefUpdateTest: Use try-with-resource for auto-closable types RefUpdateTest: Add null check to prevent potential NPE CommitCommand: Remove redundant null check JGit v4.2.0.201512141825-rc1 Change-Id: I2179859289b2f2e3d0b7c6d02ef7e7890c467f7b Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | CheckoutCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-191-48/+49
| | | | | | | | | | | | | | | | | | | | | | | | Also rename a local variable in one of the tests that was hiding a class variable of the same name. Change-Id: Ia9398157b87a78df6eef0b64a833c16ca2e57ce3 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | BranchCommandTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-191-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | Also remove a local variable in one of the tests that was hiding a member variable with the same name. Change-Id: Ia4d94cdbf2d83d8be2645f0a93d8891d01606c59 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | CheckoutTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-191-285/+306
| | | | | | | | | | | | | | | Change-Id: I49a03f7bee0b61c062ce160674f9aa0cd1bcc8ba Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | BranchTest: Create Git instances in try-with-resourceDavid Pursehouse2016-01-191-8/+12
| | | | | | | | | | | | | | | Change-Id: I8becee479fab91a18e6daffd6f4fd57338c9d120 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | URIishTest: Use @Test annotation's `expected` argumentDavid Pursehouse2016-01-191-36/+10
| | | | | | | | | | | | | | | | | | | | | | | | Specify the expected exception in the annotation, instead of catching it and calling `fail()` when it wasn't raised. Change-Id: I8a640c0e42353533e4e73b85b50c224dc060f2d7 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Suppress "The allocated object is never used" warning in testsDavid Pursehouse2016-01-196-0/+13
| | | | | | | | | | | | | | | Change-Id: Ibb405e0b36ce5a2cb30268a7de31ab2bd079ad80 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Add $NON-NLS to suppress "Non-externalized string literal" warningsDavid Pursehouse2016-01-1910-41/+41
| | | | | | | | | | | | | | | Change-Id: I3e6f83ad2bc7d493e2c1ab5a8c60affa2b49c386 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Don't use deprecated constructors of CmdLineExceptionDavid Pursehouse2016-01-196-22/+29
| | | | | | | | | | | | | | | Change-Id: If01fa896537209821d6a7a262ee978572195a397 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * | Merge "Prepare 4.2.0-SNAPSHOT builds" into stable-4.2Matthias Sohn2016-01-1946-49/+49
| |\ \
| | * | Prepare 4.2.0-SNAPSHOT buildsMatthias Sohn2016-01-1946-49/+49
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibe38a95bf36db0c0ed948280b28c416943ec0329 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Merge "Remove org.eclipse.jgit.updatesite project from tools/version.sh" ↵Matthias Sohn2016-01-191-11/+0
| |\| | | | | | | | | | | | | | into stable-4.2
| | * | Remove org.eclipse.jgit.updatesite project from tools/version.shMatthias Sohn2016-01-191-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to update versions for this project which was removed a long time ago. Change-Id: Ie2d030134942add152847581797db3a213ec4c9e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | RevParse: Remove superfluous semicolonDavid Pursehouse2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I5975bc58d7933dafb3e7a8d891e9f6878b98a9a1 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>