aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Format @NonNull on return value as method annotationJonathan Nieder2018-10-094-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | For example, instead of using public @NonNull String getMyFavoriteString() { ... } use @NonNull public String getMyFavoriteString() { ... } This makes the style more consistent (the existing JGit code base tends to lean toward the second style) and makes the source code better reflect how the annotation is parsed, as a METHOD annotation. Longer term, we should switch to a TYPE_USE annotation and switch to the first style. Noticed using a style checker that follows https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations Change-Id: I9b9fa08035d805ca660520f812a84d2f47eff507 Reported-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* Format @Nullable on return value as method annotationJonathan Nieder2018-10-097-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | For example, instead of using public @Nullable String getMyFavoriteString() { ... } use @Nullable public String getMyFavoriteString() { ... } This makes the style more consistent (the existing JGit code base tends to lean toward the second style) and makes the source code better reflect how the annotation is parsed, as a METHOD annotation. Longer term, we should switch to a TYPE_USE annotation and switch to the first style. Noticed using a style checker that follows https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations Change-Id: I07f4e67cc149fb8007f696a4663e10d4bfc57e3a Reported-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* Avoid using @Nullable to annotate arraysJonathan Nieder2018-10-094-6/+1
| | | | | | | | | | | | | | | | | | As described in the javadoc for org.eclipse.jgit.annotations.Nullable: Warning: Please do not use this annotation on arrays. Different annotation processors treat `@Nullable Object[]` differently: some treat it as an array of nullable objects, for consistency with versions of `Nullable` defined with `@Target TYPE_USE`, while others treat it as a nullable array of objects. JGit therefore avoids using this annotation on arrays altogether. See the checker-framework manual[1] for details. [1] http://types.cs.washington.edu/checker-framework/current/checker-framework-manual.html#faq-array-syntax-meaning Change-Id: I14ffcf80adbb8145d797998de2f2fa6ab84c3ae3 Signed-off-by: Jonathan Nieder <jrn@google.com>
* FsckError: Use @Nullable as field annotation (before any modifier)Ivan Frade2018-10-091-1/+2
| | | | | | | More consistent with general coding style. Change-Id: Idd0695c63d0b4a17640460e8c388ce12e952879a Signed-off-by: Ivan Frade <ifrade@google.com>
* DfsFsck: Check that .gitmodules in the repository have valid contentsIvan Frade2018-10-095-1/+109
| | | | | | | | | | | | | | | | Previous commits block the addition to the repo of dangerous .gitmodules files, but some could have been committed before those safeguards where in place. Add a check in DfsFsck to validate the .gitmodules files in the repo. Use the same validation than the ReceivePack, translating the results to FsckErrors. Note that *all* .gitmodules files in the storage will be checked, not only the latest version. Change-Id: I040cf1f31a779419aad0292ba5e6e76eb7f32b66 Signed-off-by: Ivan Frade <ifrade@google.com>
* FsckError.CorruptObject: Use @Nullable constructor for errorTypeIvan Frade2018-10-092-11/+7
| | | | | | | | | | | errorType is already null in the caller and callee when unknown, so we can replace a conditional call to a setter in the only caller with an unconditionally provided @Nullable constructor parameter. As a bonus, this lets us mark the field as final. Change-Id: Ie2f929180e74ffa1aba8ec6caccfa81fbd8bfc04 Signed-off-by: Ivan Frade <ifrade@google.com>
* SubmoduleValidator: Always throw SubmoduleValidationExceptionIvan Frade2018-10-094-22/+56
| | | | | | | | | | | The fsck test needs more detail about the error than an IOException with an explanatory message. Add an error identifier to the SubmoduleValidatorException and make it the only throwable exception when parsing a file. Change-Id: Ic3f0955b497e1681b25e681e1282e876cdf3d2c5 Signed-off-by: Ivan Frade <ifrade@google.com>
* Merge branch 'stable-5.1'Jonathan Nieder2018-10-081-12/+16
|\ | | | | | | | | | | | | | | | | * stable-5.1: SubmoduleValidator: Remove unused import of ConfigConstants SubmoduleValidator: Permit missing path or url Change-Id: Ie0e35231c81a0c53c2051c4c123a5210b5a1c6d3 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Merge branch 'stable-5.0' into stable-5.1Jonathan Nieder2018-10-081-12/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: SubmoduleValidator: Remove unused import of ConfigConstants SubmoduleValidator: Permit missing path or url Change-Id: Iaa3160a1307777cc4233d82e50a57c63d75d141c Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * Merge branch 'stable-4.11' into stable-5.0Jonathan Nieder2018-10-081-12/+16
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: SubmoduleValidator: Remove unused import of ConfigConstants SubmoduleValidator: Permit missing path or url Change-Id: Iaf3b994e763bd02054b820cd87fe68ff83675001 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | * Merge branch 'stable-4.10' into stable-4.11Jonathan Nieder2018-10-081-12/+16
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: SubmoduleValidator: Remove unused import of ConfigConstants SubmoduleValidator: Permit missing path or url Change-Id: Id74c837d6cb728439ccbd6ade71936b493c09e08 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | * Merge branch 'stable-4.9' into stable-4.10Jonathan Nieder2018-10-081-12/+16
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: SubmoduleValidator: Remove unused import of ConfigConstants SubmoduleValidator: Permit missing path or url Change-Id: Ib3c311f1e8d2db95510292a72f2f49825ffce9d9 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | * Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-081-1/+0
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: SubmoduleValidator: Remove unused import of ConfigConstants Change-Id: Id01fd9945e23a9343f96c42db89d5a1b302dad33 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | | * Merge branch 'stable-4.7' into stable-4.8Jonathan Nieder2018-10-081-1/+0
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: SubmoduleValidator: Remove unused import of ConfigConstants Change-Id: I6a7d19602d6d9099928ee52de727743b9717f262 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | | | * SubmoduleValidator: Remove unused import of ConfigConstantsDavid Pursehouse2018-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6afe5690bf9d1f1f4d414aa618daefc8b48d217e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * | | Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-081-11/+16
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: SubmoduleValidator: Permit missing path or url Change-Id: I989ac2c0c124c82385fc7cac7e0544ec225f7589 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | | * | Merge branch 'stable-4.7' into stable-4.8Jonathan Nieder2018-10-081-11/+16
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: SubmoduleValidator: Permit missing path or url Change-Id: I94fdaf45abbf7665f9eddc14b1a7f7144aafeadf Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | | | * SubmoduleValidator: Permit missing path or urlJonathan Nieder2018-10-081-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A .gitmodules file can include a submodule without a path to configure the URL for a submodule that is only present on other branches. A .gitmodules file can include a submodule with no URL and no path to reserve the name for a submodule that existed in earlier history but is not available from any URL any more. "git fsck" permits both of these cases. Permit them in JGit as well (instead of throwing NullPointerException). Change-Id: I3b442639ad79ea7a59227f96406a12e62d3573ae Reported-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | RefAdvertiser: Add Javadoc for usage of send(Collection)Michael Keppler2018-10-081-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was not updated with the original introduction of the new method. Bug: 534731 Change-Id: Ic4589c3a209109a829fbb706a9bf38845134e904 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* | | | | | | | SubmoduleAddCommand: Remove double-check of submodule nameJonathan Nieder2018-10-071-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since v4.7.5.201810051826-r~3 (SubmoduleAddCommand: Reject submodule URIs that look like cli options, 2018-09-24), SubmoduleAddCommand checks submodule names for ".." path components in assertValidSubmoduleName. This additional check for the same is redundant. Change-Id: I993326a370978880b690dc133a81fa3025935bcb Signed-off-by: Jonathan Nieder <jrn@gmail.com>
* | | | | | | | Merge branch 'stable-5.1'David Pursehouse2018-10-080-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Update API warning filter to 5.1.3 Change-Id: I5d88e41308dc3076e17463d949efdabcf602305a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | | | | Update API warning filter to 5.1.3Matthias Sohn2018-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added API in 4.7.5 to fix CVE-2018-17456 Change-Id: I14698fb088de91b8ba8856e461f64138025a89fa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Merge branch 'stable-5.1'Jonathan Nieder2018-10-071-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: I20f19666c2faccc68bfd5ea15582b534784a027a Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | | | | | | Merge branch 'stable-5.0' into stable-5.1Jonathan Nieder2018-10-071-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: Ib32077c6640621670649fa4fbfcc8d0c9d8346f1 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * | | | | | Merge branch 'stable-4.11' into stable-5.0Jonathan Nieder2018-10-071-2/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: If82e40c5a39b84c6a63e8cc10d168696c4eb3e91 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | * | | | | Merge branch 'stable-4.10' into stable-4.11Jonathan Nieder2018-10-071-2/+2
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: Id2c8d1d4ffdf7bf18ef64479cfa1e959d9b2c37e Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | * | | | Merge branch 'stable-4.9' into stable-4.10Jonathan Nieder2018-10-071-2/+2
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: I847bdb9ef2b9e733c79489577b8b6e852ce6abf3 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | * | | Merge branch 'stable-4.8' into stable-4.9Jonathan Nieder2018-10-071-2/+2
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: Ic73df5571e1ae86e5e026d0bf9d8e9e330cbfa97 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | | * | Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-10-071-2/+2
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: ObjectChecker#getGitsubmodules: Fix malformed javadoc Change-Id: I51ddd8fa1c2fbcabfb010bc4662d2c925563b55a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | * ObjectChecker#getGitsubmodules: Fix malformed javadocDavid Pursehouse2018-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text "<tree, blob>" with angle brackets should not be used in javadoc since it is interpreted as an HTML tag and then rejected since it's not a valid HTML tag. Wrap the text in a @literal tag. Also add a missing space. Change-Id: Ide045e8c04a39a916f5b2e964e58c151e4555830 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Merge branch 'stable-5.1'Matthias Sohn2018-10-0614-57/+680
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.3-SNAPSHOT builds JGit v5.1.2.201810061102-r Prepare 4.11.5-SNAPSHOT builds JGit v4.11.4.201810060650-r Fix configuration of maven-javadoc-plugin Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Revert "Configure WindowCache settings to use in JGit CLI" Change-Id: I833d30d6de75b097377872c000b2ef5a1b96cf89 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Prepare 5.1.3-SNAPSHOT buildsMatthias Sohn2018-10-0656-357/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I75c1a01885115fc709ab37f181234264c3f7423a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | JGit v5.1.2.201810061102-rv5.1.2.201810061102-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id34e4ae12a796460862edc37c5eb072314199bf4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Merge branch 'stable-5.0' into stable-5.1Matthias Sohn2018-10-0612-29/+673
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Prepare 4.11.5-SNAPSHOT builds JGit v4.11.4.201810060650-r Fix configuration of maven-javadoc-plugin Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options * Fix todos in SubmoduleAddTest Change-Id: I53272081094b8948a40a1ce409af08b6ef330c1e Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2018-10-0612-15/+682
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Prepare 4.11.5-SNAPSHOT builds JGit v4.11.4.201810060650-r Fix configuration of maven-javadoc-plugin Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options * Fix configuration of maven-javadoc-plugin for site generation Change-Id: Ic6ff8d324867ee41f15a5b890c7eee5092e8453e Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Prepare 4.11.5-SNAPSHOT buildsMatthias Sohn2018-10-0656-356/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifbe76e14264e8b547930e2320e8e81d728bd6e38 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | JGit v4.11.4.201810060650-rv4.11.4.201810060650-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5700ebd341b6b997a7757b17e7d731c4ce608ec2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-10-061-1/+1
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Fix configuration of maven-javadoc-plugin Change-Id: I80db074c45e840f15e227a400ef637b85084e711 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Fix configuration of maven-javadoc-pluginMatthias Sohn2018-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since maven-javadoc-plugin additionalJOption replaces additionalparam to pass additional options to JavaDoc. See https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#additionalJOption Change-Id: Iddff5873520a181bcb9edf285b0c8db532e930ee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-10-0611-9/+682
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Ibd759f5d425f714e79b3137ff8e5b0f989933de0 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-10-0611-9/+682
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Ie59e34eb591a827d1ce8e483eec6d390a3c81702 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | Prepare 4.9.7-SNAPSHOT buildsMatthias Sohn2018-10-0656-333/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I20e7bd6bdebcdb55a8c771314759bd8f98f04ef6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | JGit v4.9.6.201810051924-rv4.9.6.201810051924-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib39aaae26da17aa37d654b24c1defd45126f4ea2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-10-0611-10/+683
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Ia7a826399d8d5b8a0eb7169b40e98a6f5c207a4c Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * | Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-10-0611-10/+683
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Change-Id: Id6fabec4d0b682a7e20a46e88cbc05432efca062 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Prepare 4.7.6-SNAPSHOT buildsMatthias Sohn2018-10-0656-321/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I99b59116999742d8d6cdba26287ea7c6eba11a30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * JGit v4.7.5.201810051826-rv4.7.5.201810051826-rMatthias Sohn2018-10-0656-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I60c7a2eff3dab5083f71df0d9465a4e94b5e2513 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * BaseReceivePack: Validate incoming .gitmodules filesIvan Frade2018-10-055-1/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main concern are submodule urls starting with '-' that could pass as options to an unguarded tool. Pass through the parser the ids of blobs identified as .gitmodules files in the ObjectChecker. Load the blobs and parse/validate them in SubmoduleValidator. Change-Id: Ia0cc32ce020d288f995bf7bc68041fda36be1963 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * ObjectChecker: Report .gitmodules files found in the packIvan Frade2018-10-054-7/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to validate .gitmodules files, we first need to find them in the incoming pack. Do it in the ObjectChecker stage. Check in the tree objects if they point to a .gitmodules file and report the tree id and the .gitmodules blob id. This can be used later to check if the file is in the root of the project and if the contents are good. While we're here, make isMacHFSGit more accurate by detecting variants of filenames that vary in case. [jn: tweaked NTFS and HFS+ checking; added more tests] Change-Id: I70802e7d2c1374116149de4f89836b9498f39582 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * SubmoduleAddCommand: Reject submodule URIs that look like cli optionsIvan Frade2018-10-056-3/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C git versions before 2.19.1, the submodule is fetched by running "git clone <uri> <path>". A URI starting with "-" would be interpreted as an option, causing security problems. See CVE-2018-17456. Refuse to add submodules with URIs, names or paths starting with "-", that could be confused with command line arguments. [jn: backported to JGit 4.7.y, bringing portions of Masaya Suzuki's dotdot check code in v5.1.0.201808281540-m3~57 (Add API to specify the submodule name, 2018-07-12) along for the ride] Change-Id: I2607c3acc480b75ab2b13386fe2cac435839f017 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>