summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | ProgressSpinner: Simple busy wait entertainmentShawn Pearce2015-12-161-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep a user amused while the server does work by spinning a little ASCII-art object on a single line. Change-Id: Ie8f181d1aa606d4ae69e5d3ca4db387cea739f38
| * | | | Included cached deltas in delta packStatistics.James Kolb2015-12-162-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, non-reuse deltas were only included in packStatistics if they were not cached by the deltaWindow. Change-Id: I7684d8214875f0a7569b34614f8a3ba341dbde9c Signed-off-by: James Kolb <jkolb@google.com>
| * | | | Merge changes Ib4d53bdd,I55bd512cJonathan Nieder2015-12-163-38/+125
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Do not let PathFilter.create("a/b") match 'a' unless 'a' is a subtree Add tests for PathFilterGroup.Single
| | * | | | Do not let PathFilter.create("a/b") match 'a' unless 'a' is a subtreeJonathan Nieder2015-12-153-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PathFilter and PathFilterGroup form JGit's implementation of git's path-limiting feature in commands like log and diff. To save time when traversing trees, a path specification foo/bar/baz tells the tree walker not to traverse unrelated trees like qux/. It does that by returning false from include when the tree walker is visiting qux and true when it is visiting foo. Unfortunately that test was implemented to be slightly over-eager: it doesn't only return true when asked whether to visit a subtree "foo" but when asked about a plain file "foo" as well. As a result, diffs and logs restricted to some-file/non-existing-suffix unexpectedly match against some-file: $ jgit log -- LICENSE/no-such-file commit 629fd0d594d242eab26161b0dac34f7576fd4d3d Author: Shawn O. Pearce <spearce@spearce.org> Date: Fri Jul 02 14:52:49 2010 -0700 Clean up LICENSE file [...] Fix it by checking against the entry's mode. Gitiles +log has the same bug and benefits from the same fix. Callers know not to worry about what subtrees are included in the tree walk because shouldBeRecursive() returns true in this case, so this behavior change should be safe. This also better matches the behavior of C git: $ empty=$(git mktree </dev/null) $ git diff-tree --abbrev $empty HEAD -- LICENSE/no-such-file $ git diff-tree --abbrev $empty HEAD -- tools/no-such-file :000000 040000 0000000... b62648d... A tools Bug: 484266 Change-Id: Ib4d53bddd8413a9548622c7b25b338d287d8889d
| | * | | | Add tests for PathFilterGroup.SingleJonathan Nieder2015-12-151-33/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand the existing PathFilterGroup tests to check which paths the tree entry matches. This expands test coverage by ensuring that PathFilterGroup's simpler code path to match against a single PathFilter works correctly. While at it, move the check on tree entry d/e/f/g.y into two separate tests: one to check that it doesn't match any of the configured paths, and another to check that it does not throw StopWalkException to end the walk early. Change-Id: I55bd512cd049fc2018659e2f86a4b8650f171fda
| * | | | | Merge "Fix InterruptTimer leak in BasePackConnection"Shawn Pearce2015-12-161-1/+3
| |\ \ \ \ \
| | * | | | | Fix InterruptTimer leak in BasePackConnectionMatthias Sohn2015-12-161-1/+3
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting timeout on push, BasePackConnection creates a timer, which will be terminated when push finishes. But, when using SmartHttpPushConnection, it dropped the first timer created in the constructor and then created another timer in doPush. If new threads are created faster than the gc collects then this may stop the service if it's hitting the max process limit. Hence don't create a new timer if it already exists. Bug: 474947 Change-Id: I6746ffe4584ad919369afd5bdbba66fe736be314 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | Merge "Fix NPE in HttpSupport"Shawn Pearce2015-12-161-13/+14
| |\ \ \ \ \
| | * | | | | Fix NPE in HttpSupportMatthias Sohn2015-12-161-13/+14
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Bug: 483366 Change-Id: I107f1b44e0e6371e3cfbd1cc18a970412e1fc679 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | Merge "Refspec: loosen restrictions on wildcard "*""Shawn Pearce2015-12-152-19/+35
| |\ \ \ \ \
| | * | | | | Refspec: loosen restrictions on wildcard "*"Marc Strapetz2015-10-212-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Git 2.6 wildcard restrictions for refspecs have been loosened: refspecs like "refs/heads/*foo:refs/heads/foo*" are valid now. See Git commit 8d3981ccbed9fc211b4e67105015179d9d2a5692 Change-Id: Icb78afbd282c425173b3a7bc10eadc4015689bb8 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
| * | | | | | Merge "BaseRepositoryBuilder should trim CR from .git symref"Shawn Pearce2015-12-151-1/+2
| |\ \ \ \ \ \
| | * | | | | | BaseRepositoryBuilder should trim CR from .git symrefMarc Strapetz2015-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I909c2892100da89f6670ffbf3442f11c9cb7b008 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
| * | | | | | | Merge "Fix possible arithmetic overflow when setting a timeout"Shawn Pearce2015-12-151-1/+2
| |\ \ \ \ \ \ \
| | * | | | | | | Fix possible arithmetic overflow when setting a timeoutChristian Halstrick2015-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BasePackPushConnection#readStringLongTimeout() was setting a timeout 10 times bigger than some other timeout or the pack transfer time. This could lead to negative integer values when we hit an arithmetic overflow. Add a check for this situation and set the timeout to Integer.MAX_VALUE when overflow happens. Bug: 484352 CC: Eugene Petrenko <eugene.petrenko@gmail.com> Change-Id: Ie2a86312c1bcb1ec3e6388fa490ab3c845d41808
| * | | | | | | | Merge "Accept UTF8 BOM with BlobBasedConfig"Shawn Pearce2015-12-151-1/+9
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Accept UTF8 BOM with BlobBasedConfigDoug Kelly2015-12-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In I1f5dc07182dbf6bba2a9f4807fdd25b475da4ead, FileBasedConfig got support for reading a configuration with UTF8 BOM. Apply the same support to BlobBasedConfig, to make SubmoduleWalk able to parse .gitmodules configurations with BOM. Change-Id: I25b5474779952fe2c076180b96fc2869eef190a8 Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
| * | | | | | | | | Merge "Bug 484342: Support @ in username in SSH url."Shawn Pearce2015-12-152-1/+43
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | |
| | * | | | | | | | Bug 484342: Support @ in username in SSH url.Mike Gilbode2015-12-152-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5795e925afff796488ba26c83694e806b76a374f Signed-off-by: Mike Gilbode <gilbode@gmail.com>
| * | | | | | | | | Fix push with jgit pgm failing with "unauthorized"Matthias Sohn2015-12-155-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushing with JGit commandline to e.g. Github failed with "unauthorized" since HttpUrlConnection calls the configured authenticator implicitly. The problem is that during a push two requests are sent to the server, first a GET and then a POST (containing the pack data). The first GET request sent anonymously is rejected with 401 (unauthorized). When an Authenticator is installed the java.net classes will use the Authenticator to ask the user for credentials and retry the request. But this happens under the hood and JGit level code doesn't see that this happens. The next request is the POST but since JGit thinks the first GET request went through anonymously it doesn't add authentication headers to the POST request. This POST of course also fails with 401 but since this request contains a lot of body-data streamed from JGit (the pack file!) the java.net classes can't simply retry the request with authorization headers. The whole process fails. Fix this by using Apache httpclient which doesn't use Authenticator to retrieve credentials. Instead initialize TransportCommand to use the default credential provider if no other credentials provider was set explicitly. org.eclipse.jgit.pgm.Main sets this default for the JGit command line client. Change-Id: Ic4e0f8b60d4bd6e69d91eae0c7e1b44cdf851b00 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | Enable retrieval of credentials from .netrc for AwtCredentialsProviderMatthias Sohn2015-12-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done for ConsoleCredentialsProvider earlier, we need the AwtCredentialsProvider for debugging jgit command line since there is no console in Eclipse. Hence also add support for .netrc here. Change-Id: Ibbd45b73efc663821866754454cea65e6d03f832 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | Merge "NetRCCredentialsProvider should return false if any item is missing"Christian Halstrick2015-12-153-9/+15
| |\ \ \ \ \ \ \ \ \
| | * | | | | | | | | NetRCCredentialsProvider should return false if any item is missingMatthias Sohn2015-12-083-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I894d1621aaccd71dfe100fe83a1bd9d50a1e0808
| * | | | | | | | | | Merge "Fix ChainingCredentialsProvider"Christian Halstrick2015-12-151-2/+8
| |\| | | | | | | | | | | |_|_|/ / / / / / | |/| | | | | | | |
| | * | | | | | | | Fix ChainingCredentialsProviderMatthias Sohn2015-12-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ChainingCredentialsProvider gave up chaining to the next provider if the first one returned no credentials items for the given URI. Change-Id: I9539c50db35e564db9d43d8ebb71d7e9c6fdcc19 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | Null-annotated Ref class and fixed related compiler errorsAndrey Loskutov2015-12-1522-92/+244
| | |_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes all compiler errors in JGit and replaces possible NPE's with either appropriate exceptions, avoiding multiple "Nullable return" method calls or early returning from the method. Change-Id: I24c8a600ec962d61d5f40abf73eac4203e115240 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* | | | | | | | | 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>
* | | | | | | | 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