aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Minor improvements in git config file inclusionsThomas Wolf2018-01-284-7/+94
| | | | | | | | | | | * Section and key names in git config files are case-insensitive. * If an include directive is invalid, include the line in the exception message. * If inclusion of the included file fails, put the file name into the exception message so that the user knows in which file the problem is. Change-Id: If920943af7ff93f5321b3d315dfec5222091256c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Progress reporting for checkoutMarkus Duft2018-01-2312-2/+141
| | | | | | | | | | | | | | The reason for the change is LFS: when using a lot of LFS files, checkout can take quite some time on larger repositories. To avoid "hanging" UI, provide progress reporting. Also implement (partial) progress reporting for cherry-pick, reset, revert which are using checkout internally. The feature is also useful without LFS, so it is independent of it. Change-Id: I021e764241f3c107eaf2771f6b5785245b146b42 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enforce DFS blockLimit is a multiple of blockSizeDave Borowitz2018-01-223-6/+31
| | | | Change-Id: I2821124ff88d7d1812a846ed20f3828fc9123b38
* Upgrade gson to version 2.8.2David Pursehouse2018-01-207-12/+17
| | | | | | | | CQ: 15286 CQ: 15287 (Orbit) Change-Id: I43312d5276b64d871f7fa253a43a090f9b163724 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Upgrade commons-compress to 1.15David Pursehouse2018-01-1912-39/+51
| | | | | | | | | | | | | | | Also update xz to 1.6 as this is the version commons-compress 1.15 wants. Since xz 1.6 is an optional dependency for commons-compress we need to add a non-optional dependency to xz for org.eclipse.jgit.pgm.test since one of the tests explicitly requires xz. Related change adding commons-compress to Orbit: https://git.eclipse.org/r/#/c/115366/ CQ: 15356 CQ: 15360 Change-Id: I0d61c71bc541cc30464a0fff93775b079dd3ba88 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert usage of TYPE_USE in Nullable and NonNull annotationsDavid Pursehouse2018-01-196-8/+19
| | | | | | | | | | | | Using TYPE_USE causes compilation errors in Eclipse Neon.3 (JDT 3.12.3) and Eclipse Oxygen.2 (JDT 3.13.2). This reverts commit 8e217517e2c515032dd0d661535d2133cd80123a. This reverts commit 55eba8d0f55464ca84d676828f67a6fe14b2454d. Reported-by: Thomas Wolf <thomas.wolf@paranor.ch> Change-Id: I96869f80dd11ee238911706581b224bca4fb12cd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Nullable: Switch to TYPE_USEDavid Pursehouse2018-01-185-13/+6
| | | | | | | | | | | | | | | Since JGit now requires Java 8, we can switch to TYPE_USE instead of explicitly specifying the target type. Some of the existing uses of Nullable need to be reworked slightly as described in [1] to prevent the compilation error: scoping construct cannot be annotated with type-use annotation [1] https://stackoverflow.com/a/21385939/381622 Change-Id: Idba48f67a09353b5237685996ce828c8ca398168 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* NonNull: Switch to TYPE_USEDavid Pursehouse2018-01-181-6/+2
| | | | | | | | Since JGit now requires Java 8, we can switch to TYPE_USE instead of explicitly specifying the target type. Change-Id: I373d47c3d92507459685789df1fad0933d5625ff Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* NonNull: Fix typo in javadocDavid Pursehouse2018-01-181-1/+1
| | | | | Change-Id: Ia8e6559047a12391223645e2768f46666f198f6d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* RevWalk: Annotate methods documented to return "Never null" as @NonNullDavid Pursehouse2018-01-181-0/+12
| | | | | Change-Id: If1a1bed4b04dd48c9573fd3c4eacbf73de40622f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Skip broken symbolic ref in DfsReftableDatabaseZhen Chen2018-01-171-1/+1
| | | | | | | | | | We skipped the broken symbolic reference in other implementation like DfsRefDatabase, RefDirectory. The broken symbolic reference may cause NPE when caller forget to have a null check against the object id before calling parse it. Change-Id: If5e07202e9ee329d0bd9488936d79c98143c7ad9 Signed-off-by: Zhen Chen <czhen@google.com>
* Make SideBandInputStream publicHan-Wen Nienhuys2018-01-171-1/+2
| | | | | | | This mirrors SideBandOutputStream which is also public Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Ic0983af663f0c4c85bf5486b195108c45cddc4c2
* Merge branch 'stable-4.10'Matthias Sohn2018-01-133-61/+103
|\ | | | | | | | | | | | | | | | | * stable-4.10: Revert handling of ssh IdentityFile to pre-4.9 behavior Prepare 4.10.1-SNAPSHOT builds JGit v4.10.0.201712302008-r Change-Id: I13797f064de919c257feb8e96da226d7b1faaf7a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-01-133-61/+103
| |\ | | | | | | | | | | | | | | | | | | * stable-4.9: Revert handling of ssh IdentityFile to pre-4.9 behavior Change-Id: I7cd2f0fe93be5193d6de2a376a023bdece5d84a9
| | * Revert handling of ssh IdentityFile to pre-4.9 behaviorThomas Wolf2018-01-123-61/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jsch caches keys (aka identities) specified in ~/.ssh/config via IndentityFile only for the current Jsch Session. This results in multiple password prompts for successive sessions. Do the handling of IdentityFile exclusively in JGit, as it was before 4.9. JGit uses different Jsch instances per host and caches the IdentityFile there, allowing it to be re-used in different sessions for the same host. * Add comments to explain this. * Move the JschBugFixingConfig from OpenSshConfig to JschConfigSessionFactory to have all these Jsch work-arounds in one place. * Make that config hide the IdentityFile config from Jsch to avoid that Jsch overrides the JGit behavior. Bug: 529173 Change-Id: Ib36c34a2921ba736adeb64de71323c2b91151613 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | Prepare 4.10.1-SNAPSHOT buildsMatthias Sohn2017-12-3156-334/+334
| | | | | | | | | | | | | | | Change-Id: I139fb660c4630d9d073eabf37ff26ea3a823bcbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v4.10.0.201712302008-rv4.10.0.201712302008-rMatthias Sohn2017-12-3156-60/+60
| | | | | | | | | | | | | | | Change-Id: I9cc3a839d906acd01829df1de64cfafca8a6d008 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | PackInserterTest#newLargeBlob: Factor Random instance out to class memberDavid Pursehouse2018-01-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of instantiating a new Random on each invocation of newLargeBlob, create it once and reuse it. This fixes a warning raised by Spotbugs about the Random object being created and only used once. Change-Id: I5b8e6ccbbc92641811537808aed9eae2034c1133 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Upgrade error_prone_core to 2.2.0David Pursehouse2018-01-101-1/+1
| | | | | | | | | | | | | | | Change-Id: Icf1e2fba724dec363bdc941e562396255b9d9faf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | RefDirectory#hasLooseRef: Fix stream resource leak reported by error-proneDavid Pursehouse2018-01-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error-prone reports: [StreamResourceLeak] Streams that encapsulate a closeable resource should be closed using try-with-resources Change-Id: I86154fba2b896723feaecf8991ed3c8e96ea2499 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Update developers list in pom.xmlDavid Pursehouse2018-01-101-0/+6
| | | | | | | | | | | | | | | Change-Id: If391947957918a456a8f9eb315c95bb669a413b4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Upgrade Spotbugs to 3.1.1David Pursehouse2018-01-101-1/+1
| | | | | | | | | | | | | | | Change-Id: Ie43c74acabd9520dde5d8577f040e6575bd3ebbc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Ensure DirectoryStream is closed promptlyDave Borowitz2018-01-051-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the javadoc for Files.list: "The returned stream encapsulates a DirectoryStream. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed." This is the only call to Files#newDirectoryStream that is not already in a try-with-resources. Change-Id: I91e6c56b5d74e8435457ad6ed9e6b4b24d2aa14e
* | | Add com.jcraft.jzlib 1.1.1Matthias Sohn2018-01-0412-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com.jcraft.jsch requires com.jcraft.jzlib to provide optional zlib packet compression support. Add this library so that jgit can handle packet compression. CQ: 15292 Bug: 529129 Change-Id: I0297bd0488753547a5f5d47dbf0db508a79dd265 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Fix file handle leak in FetchCommand#fetchSubmodules"Matthias Sohn2018-01-041-30/+34
|\ \ \
| * | | Fix file handle leak in FetchCommand#fetchSubmodulesTim Hosey2018-01-041-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private fetchSubmodules method in the FetchCommand class creates a Repository instance for each submodule being fetched, but never calls closes on it. This leads to the leaking of file handles. Bug: 526494 Change-Id: I7070388b8b62063d9d5cd31afae3015a8388044f Signed-off-by: Tim Hosey <timhoseydev@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Skip unborn branches in UploadPackZhen Chen2018-01-032-4/+10
|/ / / | | | | | | | | | | | | | | | | | | The ObjectId of an unborn branch is null, skip those in UploadPack. Change-Id: I7cbf66b05dff98c4fe9f33e20a647ba6acf364b2 Signed-off-by: Zhen Chen <czhen@google.com>
* / / Prepare 4.11.0-SNAPSHOT buildsMatthias Sohn2017-12-3156-334/+334
|/ / | | | | | | | | Change-Id: I5d5e2befcf530d93457d44684bd9e4fc2392e5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | WorkingTreeIterator should pass FS to submodulesMarc Strapetz2017-12-302-3/+22
| | | | | | | | | | Change-Id: I4b7bc6bab449b9e3aebba8170788ff9e4a04195a Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | CloneCommand: option to set FS to be usedMarc Strapetz2017-12-291-0/+20
| | | | | | | | | | Change-Id: If8342974d07b7d89a6c5721a6dd03826886aa89e Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | InitCommand: option to set FS to be usedMarc Strapetz2017-12-291-0/+20
| | | | | | | | | | Change-Id: I95c72f3bdc2da748adbb0d82af72f60650821aab Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Add a command to deinitialize submodulesDavid Turner2017-12-276-1/+691
| | | | | | | | | | Change-Id: Iaaefc2cbafbf083d6ab158b1c378ec69cc76d282 Signed-off-by: David Turner <dturner@twosigma.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Use submodule name instead of path as key in configDavid Turner2017-12-274-12/+20
| | | | | | | | | | | | | | | | | | When a submodule is moved, the "name" field remains the same, while the "path" field changes. Git uses the "name" field in .git/config when a submodule is initialized, so this patch makes JGit do so too. Change-Id: I48d8e89f706447b860c0162822a8e68170aae42b Signed-off-by: David Turner <dturner@twosigma.com>
* | Require maven 3.5.2Matthias Sohn2017-12-272-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | This prepares builds on Java 9 [1]. The maven 2 tag "prerequisites" is not honored by maven 3 hence use maven-enforcer-plugin to enforce the minimum maven version. [1] https://issues.apache.org/jira/browse/MNG-6148 Change-Id: I57f5051a0641b1bd21f9f888f1a17d8f98e879e5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update japicmp-maven-plugin to 0.11.0Matthias Sohn2017-12-261-1/+1
| | | | | | | | | | Change-Id: Ia0c5308fc4544a3b3a4fd6a19947cfc9a33af9c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | URIish: support for empty portsMarc Strapetz2017-12-232-13/+34
| | | | | | | | | | | | | | | | Properly parse URLs like "ssh://host:/path" Bug: 519187 Change-Id: I0054868e30509e4ba919444be16c2a20f741545a Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Upgrade spotbugs-maven-plugin to 3.1.0David Pursehouse2017-12-231-1/+1
| | | | | | | | | | Change-Id: I1817afd3f75bd1f030f1b5c6bc683afa51dc5a6b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Add header Automatic-Module-Name for Java 9Karsten Thoms2017-12-2317-0/+17
| | | | | | | | | | | | Bug: 529075 Change-Id: I4532ce2c80eb91531d46026676502d636ccda706 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-12-234-1/+72
|\| | | | | | | | | | | | | | | * stable-4.9: Strings#convertGlob: fix escaping of patterns like [\[]. Change-Id: I18d55537002b3153db35f8a6b60f2f5317d17248 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Strings#convertGlob: fix escaping of patterns like [\[].Dmitry Pavlenko2017-12-214-1/+72
| | | | | | | | | | | | | | | | | | | | Originally the patterns were escaped twice leading to wrong matching results. Bug: 528886 Change-Id: I26e201b4b0ef51cac08f940b76f381260fa925ca Signed-off-by: Dmitry Pavlenko <pavlenko@tmatesoft.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge changes I8a37eaf8,Id8a5b591David Pursehouse2017-12-211-32/+1
|\ \ | | | | | | | | | | | | | | | * changes: Remove maven profile jgit.java8 Reenable failing the build on javadoc errors
| * | Remove maven profile jgit.java8Matthias Sohn2017-12-211-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | This profile isn't needed any longer since we require Java 8 as minimum version. Change-Id: I8a37eaf874473ff4004b9c074a810dddebde54c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Reenable failing the build on javadoc errorsMatthias Sohn2017-12-211-4/+1
| | | | | | | | | | | | | | | Change-Id: Id8a5b59119f3d40dea1bb46ef060a6abfff2f6bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge changes I0f1df93b,Ifd40129b,I1b059e1aDave Borowitz2017-12-213-24/+56
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * changes: ConfigTest: Add some additional comment parsing tests Config: Drop backslash in invalid escape sequences in subsections Config: Match C git behavior more closely in escaping values
| * | | ConfigTest: Add some additional comment parsing testsDave Borowitz2017-12-211-0/+5
| | | | | | | | | | | | | | | | Change-Id: I0f1df93bd1ceeb847771ea6484f9de539e8c177b
| * | | Config: Drop backslash in invalid escape sequences in subsectionsDave Borowitz2017-12-212-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are ignored by C git when parsing: $ git config -f - --list <<EOF [foo "x\0y"] bar = baz [foo "x\qy"] bar = baz [foo "x\by"] bar = baz [foo "x\ny"] bar = baz [foo "x\ty"] bar = baz EOF foo.x0y.bar=baz foo.xqy.bar=baz foo.xby.bar=baz foo.xny.bar=baz foo.xty.bar=baz This behavior is different from value parsing, where an invalid escape sequence is an error (which JGit already does as well): $ git config -f - --list <<EOF [foo] bar = x\qy EOF fatal: bad config line 2 in standard input Change-Id: Ifd40129b37d9a62df3d886d8d7e22f766f54e9d1
| * | | Config: Match C git behavior more closely in escaping valuesDave Borowitz2017-12-213-13/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So this happened: $ git config -f foo.config foo.a 'x"y' $ git config -f foo.config foo.b x\\y $ git config -f foo.config foo.c $'x\ny' $ git config -f foo.config foo.d $'x\ty' $ git config -f foo.config foo.e $'x\by' $ cat foo.config [foo] a = x\"y b = x\\y c = x\ny d = x\ty e = y That last line is my shell interpreting the backspace byte: $ python -c 'print repr(open("foo.config").read())' '[foo]\n\ta = x\\"y\n\tb = x\\\\y\n\tc = x\\ny\n\td = x\\ty\n\te = x\x08y\n' Change-Id: I1b059e1afb544c39ddb587c07bf79a06e99d0a09
* | | Merge branch 'stable-4.9'Dave Borowitz2017-12-211-1/+1
|\ \ \ | |/ / |/| / | |/ | | | | | | * stable-4.9: Make PackInserter public Change-Id: I367c6111661f3005419e2becd695e04e65202f97
| * Make PackInserter publicDave Borowitz2017-12-211-1/+1
| | | | | | | | | | | | | | | | The intent with the setCompressionLevel and checkExisting methods (which are already public) is for callers to be able to call them, but they can't do that if the class itself is not public. Change-Id: I014044fec3bfa1d33775500345efd60eb5d45bde
* | Fix remaining javadoc errors raised by doclintMatthias Sohn2017-12-2129-62/+63
| | | | | | | | | | | | | | For now ignore doclint "missing" warnings. Change-Id: I0e5af7a757f4d92ffeeb113f30576a35414d6781 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>