summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix bundle localization of Apache SSH bundleMichael Keppler2019-06-2140-73/+76
| | | | | | | | | The placeholders in manifest and plugin.properties did not match. To avoid similar issues, all placeholders have been changed to Bundle-Vendor and Bundle-Name now. Bug:548503 Change-Id: Ibd4b9bc237b323e614506b97e5fbc99416365040 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* Fix "reset -hard" bug that folders could not be deletedRené Scheibe2019-06-192-8/+20
| | | | | | | | | | | | The deleted code is not required as removed files are deleted correctly in doCheckout() anyway. The deleted code failed in case a non-empty directory had to be deleted. file.delete() returned false, triggering an exception. Bug: 479266 Change-Id: I011bb3882ff0c35b238aa3eccad7889041210277 Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
* Fix "reset -hard" bug that folders could not be createdRené Scheibe2019-06-193-0/+42
| | | | | | | | | Creating a folder failed in case a file with the same name already existed. Bug: 479266 Change-Id: Ia987660ec0968ad4081dbd5a60e80660539497e3 Signed-off-by: René Scheibe <rene.scheibe@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Bazel: Fix lint warning flagged by buildifierDavid Ostrovsky2019-06-182-8/+8
| | | | | | | | | | | | | | | | | | | | This change is fixing confusing name warning: [1]. ./org.eclipse.jgit.test/tests.bzl:12: confusing-name: Never use 'l', 'I', or 'O' as names (they're too easily confused with 'I', 'l', or '0'). And is also fixing: "All calls to rules or macros should pass arguments by keyword position argument" warning: [2]. ./org.eclipse.jgit.test/BUILD:42: positional-args: All calls to rules or macros should pass arguments by keyword (arg_name=value) syntax. [1] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#confusing-name [2] https://github.com/bazelbuild/buildtools/blob/master/WARNINGS.md#positional-args Change-Id: If5c28ec8a1ddc1d1b1035bd07b838a2a564aea4f Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Update bazlets to latest versionDavid Ostrovsky2019-06-181-1/+1
| | | | | | | | This is needed to make build tool chain compatible with the latest Bazel releases. Change-Id: I9822b5fe5f934457e6069217d687b3cf4764b7b7 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* [Java 11] Update mockito to 2.23.0Matthias Sohn2019-06-1810-61/+61
| | | | | | | | | | | | | | | This update is required for Java 11. Update - org.mockito to 2.23.0.v20190527-1420 - net.bytebuddy.byte-buddy to 1.9.0.v20181107-1410 - net.bytebuddy.byte-buddy-agent to 1.9.0.v20181106-1534 CQ: 20214 CQ: 20215 CQ: 20216 See: https://github.com/mockito/mockito/issues/1482 Change-Id: I3ac744f7247c71f01d50f7f409fee5825f3d5295 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [Java 9] Fix GitDateFormatterTestMatthias Sohn2019-06-181-4/+8
| | | | | | | | | | | | | In JDK 9 and later, the default locale data uses data derived from the Unicode Consortium's Common Locale Data Repository (CLDR). So there are changes with respect to some locales. For example the short date-time format is ‹{1}, {0}› in the CLDR locale, as opposed to {1} {0} in the JRE locale data. See: https://bugs.openjdk.java.net/browse/JDK-8206961 See: https://www.unicode.org/cldr/charts/29/by_type/date_&_time.gregorian.html#1141bf54834c4261 Change-Id: I7535821e8ecd8702a95db8732cbbf3a4a7385eca Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [Java 11] Remove dependency on javax.xml.bind packageDavid Ostrovsky2019-06-183-15/+3
| | | | | | | | | | Replace javax.xml.bind.DatatypeConverter, that is not available any more in Java 11 and later with Hex utility from non optional Bouncy Castle library. Bug: 540790 Change-Id: I9903c00ecc1a434e9795b8ba9267f02628fdc0e9 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Merge "RebaseTodoFileTest: Fix "the the" typo"David Pursehouse2019-06-161-2/+2
|\
| * RebaseTodoFileTest: Fix "the the" typoIvan Frade2019-06-121-2/+2
| | | | | | | | | | | | | | Reported by downstream analyzers. Change-Id: I719bb2dd5b59390973dc2eb0d6854096e3768afb Signed-off-by: Ivan Frade <ifrade@google.com>
* | Ignore warning that tests don't export all packagesMatthias Sohn2019-06-167-0/+238
| | | | | | | | Change-Id: I95de23fbdce125305be08079bcd179413f8f7f5c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Ensure all packages are exportedMatthias Sohn2019-06-162-3/+4
| | | | | | | | | | | | | | | | This wasn't the case for the bundles - org.eclipse.jgit.ant - org.eclipse.jgit.archive Change-Id: Ibefcc82174fe23a9c1afb765099957414ac3556b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Delete unused API problem filtersMatthias Sohn2019-06-162-202/+0
| | | | | | | | Change-Id: Id8dcc337aab4ec6a11a2bb60b85d0db42986b80b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Walk tag chains for --include-tag optionsPavel Flaška2019-06-162-2/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cloning repository with --single-branch option, tag chains are not packed and pack file is broken in some cases. Typical test-case: git tag -a test_tag <commit-id> git tag -a test_prev_tag test_tag git tag -d test_tag git clone --single-branch <repository> fatal: did not receive expected object <test_tag_id> The reason for that is missing object for original test_tag reference, which was deleted. Problem description: When pack-objects is given --include-tag, it peels each tag reference down to a commit. If the commit is prepared to be packed, we we have to include such tag too. The problem is when the tag points to through some chain of other tag to commit. Then, the inner tags are not added leading to broken pack. Fix: When going to commit, we have to check and add any of the tags on the way (if they were not selected, which may happen with --single-branch option). Change-Id: I1682d4a2c52d674f90a1b021e0f6c3524c5ce5bc Signed-off-by: Pavel Flaška <Pavel.Flaska@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update API comparison baseline to 5.4.0.201906121030-rMatthias Sohn2019-06-131-1/+1
| | | | | | | | | | Change-Id: I1d3f2e56203173e4683c3b635d9affccdd510abf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 5.5.0-SNAPSHOT buildsMatthias Sohn2019-06-1372-446/+446
| | | | | | | | | | Change-Id: I177d637e552a79014816dc5d2ef5ccda506adb39 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.4'Matthias Sohn2019-06-1396-592/+1674
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Prepare 5.4.1-SNAPSHOT builds JGit v5.4.0.201906121030-r JGit v5.4.0.201906120450-r Increase severity of OperatorPrecedence to ERROR, and fix instances PackWriter: Make internal class static Prepare 5.3.3-SNAPSHOT builds JGit v5.3.2.201906051522-r Prepare 5.1.9-SNAPSHOT builds JGit v5.1.8.201906050907-r Test detecting modified packfiles Enhance fsTick() to use filesystem timer resolution Add debug trace to measure time needed to open pack index Extend FileSnapshot for packfiles to also use checksum to detect changes Wait opening new packfile until it can't be racy anymore Avoid null PackConfig in GC Add FileSnapshot test testing recognition of file size changes Capture reason for result of FileSnapshot#isModified Skip FileSnapshotTest#testSimulatePackfileReplacement on Windows Tune max heap size for tests Fix FileSnapshotTest.testNewFileNoWait() to match its javadoc ObjectDirectory: fix closing of obsolete packs Update API filters for methods added to fix bugs Bazel: Increase severity of most error-prone checks to ERROR Enable error-prone checks by default Add bazel options to align with gerrit's Include filekey file attribute when comparing FileSnapshots Measure file timestamp resolution used in FileSnapshot Fix FileSnapshot's consideration of file size Fix API problem filters Fix API problem filters Change-Id: I4abbaaf79da1944244511aad97d2df09d47c0c3c
| * Prepare 5.4.1-SNAPSHOT buildsMatthias Sohn2019-06-1272-446/+446
| | | | | | | | | | Change-Id: I8620d03c1cd5c1d0ad04e7607553e9aa18def9bb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.4.0.201906121030-rv5.4.0.201906121030-rMatthias Sohn2019-06-1272-103/+103
| | | | | | | | | | Change-Id: Ie68828af68d07cf8e3fe778d39436f539f1c73d0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.4.0.201906120450-rMatthias Sohn2019-06-1272-103/+103
| | | | | | | | | | Change-Id: Iea17cba848d4e53d69d34e952a2476c375721aa4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Increase severity of OperatorPrecedence to ERROR, and fix instancesDavid Pursehouse2019-06-128-12/+13
| | | | | | | | | | | | | | | | Fix all remaining instances of the OperatorPrededence warning, by adding parentheses to make the precedence explicit. Change-Id: Ib296dfed09f9be042d0ff0f7fad8214e4dd766b4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge branch 'master' into stable-5.4Matthias Sohn2019-06-11102-499/+3068
| |\ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Handle missing "ours" stage in WorkingTreeIterator.hasCrLfInIndex() Config: Add helper method to check for empty value ErrorProne: Increase severity of FutureReturnValueIgnored to ERROR FS_Win32: Add missing parentheses on if-blocks Upgrade spotbugs to 3.1.12 Abbreviated{Long}ObjectId: Make operator precedence explicit GC: Update TODO comments FS_POSIX: Fix reference comparison of Boolean.FALSE Increase bazel timeout for long running tests Use bazelisk to switch between used bazel version Bump minimum Bazel version to 0.26.1 Bazel: Bump skylib library version to 0.8.0 Retry loading config when locked by another process Make pull --rebase on an unborn branch do a checkout Warn if configured cookie file is missing Handle escaped CR-LF in git config files DescribeCommand: use glob match instead of path match Fix off-by-one error in RebaseTodoFile when reading a todo file Consistently use "!isEmpty()" to detect non-empty list TransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0" TransportHttp: Fix comparison of size with ">= 0" NetscapeCookieFileTest: Split HttpCookiesMatcher to own class Bazel: Add missing dependency on mockito for TransportHttpTest Determine hard-linking and nlink support per FileStore Support reading and writing cookies. Repository: Add getIdentifier() method to avoid instanceof operator Update to Orbit R20190602212107 PacketLineIn: Deprecate the END constant PacketLineIn: Add an iterator over strings in the input stream Replace most usages of PacketLineIn.END with PacketLineIn.end() PacketLineIn: Deprecate DELIM constant Replace trivial reference comparison of PacketLineIn.{DELIM,END} PacketLineIn: Rename isDelim to isDelimiter ProtocolV2ParserTest: Fix typo in comment Upgrade Bouncy Castle to 1.61 Update to Orbit R20190531194818 and rollback update to Ant 1.10.6 cli: Add the --always option to describe DescribeCommand: Support the "always" option cli: Add the --tags option to describe DescribeCommand: Consistenly omit the default value Remove excess blank line in FileUtilsTest PacketLineIn: Add helper methods to check for END and DELIM UploadPackTest: Rename variable to avoid hiding class member UploadPackTest: Add missing <> operator on instantiation of ArrayList BitmapCalculator: javadoc fixes RevWalkUtils: add progress callback to findBranchesReachableFrom Upgrade maven-source-plugin to 3.1.0 Upgrade maven-jar-plugin to 3.1.2 Upgrade jacoco-maven-plugin to 0.8.4 BitmapCalculator and its test: add missing license header RevWalk: new method createReachabilityChecker() Change-Id: I4d76c7c0dbe6411c842f3468b709f7df51789c08 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Handle missing "ours" stage in WorkingTreeIterator.hasCrLfInIndex()Thomas Wolf2019-06-112-10/+63
| | | | | | | | | | | | | | | | | | | | | | In a delete-modify conflict with the deletion as "ours" there may be no stage 2 in the index. Add appropriate null checks. Add a new test for this case, and verify that the file gets added with a single LF after conflict resolution with core.autocrlf=true. This matches the behavior of canonical git for this case. Bug: 547724 Change-Id: I1bafdb83d9b78bf85294c78325e818e72fae53bc Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Config: Add helper method to check for empty valueDavid Pursehouse2019-06-112-5/+16
| | | | | | | | | | | | | | | | | | | | | | Rename MAGIC_EMPTY_VALUE to MISSING_ENTRY, make it private, and add a helper method to check if a given string is that value. This avoids that callers trigger the "reference equality" warning from Error Prone. Change-Id: Idc76f78c0cf1828aa48d02ee33911a4b5df50355 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | ErrorProne: Increase severity of FutureReturnValueIgnored to ERRORDavid Pursehouse2019-06-113-3/+7
| | | | | | | | | | | | | | | | The only remaining code where the return value is ignored is in tests. Update them to store the value and perform a basic assertion. Change-Id: I29ef5bd5dd0648aac3490f9e47ecc74544109652 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FS_Win32: Add missing parentheses on if-blocksDavid Pursehouse2019-06-111-5/+10
| | | | | | | | | | Change-Id: I70504484f20aee103e51c852d71cd41b54093793 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Upgrade spotbugs to 3.1.12David Pursehouse2019-06-111-1/+1
| | | | | | | | | | Change-Id: I8093ce8342ab98f12ffabaf2862e6f1b161c4c87 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Abbreviated{Long}ObjectId: Make operator precedence explicitDavid Pursehouse2019-06-112-2/+2
| | | | | | | | | | Change-Id: Iafd616d3fdc81ac3072f776061548be195270d85 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | GC: Update TODO commentsDavid Pursehouse2019-06-111-2/+2
| | | | | | | | | | | | | | | | | | The TODO comments say "in 5.0", but 5.0 was already released without resolving them. Remove "in 5.0" on the assumption that the mentioned improvements still need to be done at some point. Change-Id: I3eb429803e2266de3fc490e1f3912991c08aa1ad Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FS_POSIX: Fix reference comparison of Boolean.FALSEDavid Pursehouse2019-06-111-2/+2
| | | | | | | | | | Change-Id: Ic205d017b365ea85983d0b0d9d033fcf7e6bf6ab Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Increase bazel timeout for long running testsMatthias Sohn2019-06-101-0/+4
| | | | | | | | | | | | | | | | | | EolRepositoryTest and GcCommitSelectionTest timed out frequently when running unit tests using bazel with the default timeout "moderate" (300s). Increase timeout of these tests to "long" (900s). Change-Id: I43588cf950f55b50f868d9fe9c66d22bd428a54c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Use bazelisk to switch between used bazel versionDavid Ostrovsky2019-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bazelisk is utility to switch to the right Bazel version, that we used to have with Buck build tool: [1]. Bazelisk will download the right Bazel version only once and will use it in subsequent calls: $ bazelisk build :release 2019/06/06 16:22:15 Downloading \ https://releases.bazel.build/0.26.1/release/bazel-0.26.1-linux-x86_64... Bazelisk is storing the binaries in user's cache directory: [2], e.g. on Linux OS: $ ls -1 ~/.cache/bazelisk/bin bazel-0.26.1-linux-x86_64 * [1] https://github.com/bazelbuild/bazelisk * [2] https://golang.org/pkg/os/#UserCacheDir Change-Id: Ia9180fb75f8cc17a0a0232622cf33a13bfad6b60 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | Bump minimum Bazel version to 0.26.1David Ostrovsky2019-06-101-1/+1
| | | | | | | | | | Change-Id: I8d6f9eac5af54e5b270e7db4e52d1b4063c1aa56 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | Bazel: Bump skylib library version to 0.8.0David Ostrovsky2019-06-101-3/+3
| | | | | | | | | | Change-Id: I2089899c9f197b2c93b93390fdd55f6fe11e5ce4 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | Retry loading config when locked by another processMichael Keppler2019-06-103-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When loading the config, a FileNotFoundException may occur if the file exists but cannot be read (see [1]). This is the case on Windows with a virus scanner checking the file. Therefore if the file exists and that exception is thrown, retry multiple times, similar to how this was already implemented for IOException. [1] https://docs.oracle.com/javase/8/docs/api/java/io/FileNotFoundException.html Bug: 529522 Change-Id: Ic5dc3b7b24bb0005d6256ed00513bc7c0b91e613 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Make pull --rebase on an unborn branch do a checkoutThomas Wolf2019-06-102-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A merging pull on an unborn branch was already supported. But a rebasing pull failed. If the user has pull.rebase = true in his user config, the pull would try to rebase. Rebasing needs a parent commit, though. Native git handles this case: git init git remote add origin <URI> git pull --rebase origin master Check up front in PullCommand for the unborn head and just do a checkout in this case. MergeCommand already has similar code. Bug: 544965 Change-Id: I1277e1ac0b0364b4623fd791f3d6b07bd5f58fca Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Warn if configured cookie file is missingMatthias Sohn2019-06-093-0/+7
| | | | | | | | | | | | | | | | We logged a stack trace if the configured http.cookieFile was missing. Instead only log a warning. Bug: 548081 Change-Id: I42e39f5ad8ffce7b43162e5068f60af073b8a126 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Handle escaped CR-LF in git config filesThomas Wolf2019-06-082-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | Canonical git treats CR-LF in config files as LF.[1][2] JGit does so, too, except when escaped as a line continuation. Correct this and treat the sequence \-CR-LF as a line continuation. [1] https://github.com/git/git/commit/db2c075d9 [2] https://github.com/git/git/blob/v2.21.0/config.c#L485 Bug: 545850 Change-Id: I51e7378a22c21b3baa3701163c423d04c900af5a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | DescribeCommand: use glob match instead of path matchThomas Wolf2019-06-072-6/+28
| | | | | | | | | | | | | | | | | | | | Otherwise tags may fail to match if their name contains slashes. Canonical git also uses its wildcard matcher in glob mode.[1] [1] https://github.com/git/git/blob/v2.21.0/builtin/describe.c#L182 Bug: 546703 Change-Id: I122c7959974fa1fc6a53dfc65837e4314a8badd4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Fix off-by-one error in RebaseTodoFile when reading a todo fileThomas Wolf2019-06-072-3/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit messages of length 1 were not read. 'lineEnd' is the offset of the last character in the line before the terminating LF or CR-LF, and 'nextSpace' is actually the offset of the character _after_ the next space. With a one-character commit message, nextSpace == lineEnd. The code also assumes the commit message to be optional, but actually failed in that case because it read beyond the line ending. Fix that, too. Add a test case for reading a todo file. Bug: 546245 Change-Id: I368d63615930ea2398a6230e756442fd88870654 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Consistently use "!isEmpty()" to detect non-empty listDavid Pursehouse2019-06-0711-17/+17
| | | | | | | | | | | | | | | | | | | | Replace "size() > 0" with "!isEmpty()" where appropriate. In the Status implementation we can drop the check; the subsequent loop will only execute when the list is non-empty anyway. Change-Id: I355aff551a603373e702a9d44304f087b476263c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | TransportHttp: Check for non-empty list with "!isEmpty()" rather than ↵David Pursehouse2019-06-071-2/+2
| | | | | | | | | | | | | | "size() > 0" Change-Id: Iabb627c8f584346eb8ace3c24afb63b4d1ad3d47 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | TransportHttp: Fix comparison of size with ">= 0"David Pursehouse2019-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Error Prone reports: [SizeGreaterThanOrEqualsZero] Comparison of a size >= 0 is always true, did you intend to check for non-emptiness? see https://errorprone.info/bugpattern/SizeGreaterThanOrEqualsZero Change-Id: Ie964771cacca4b15569eb45f6e273ad2a7e2e49c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | NetscapeCookieFileTest: Split HttpCookiesMatcher to own classDavid Pursehouse2019-06-074-104/+153
| | | | | | | | | | | | | | | | | | | | | | The bazel build fails due to NetscapeCookieFileTest's internal class not being visible to TransportHttpTest. Split the file out to its own class in the util package, so it's visible to both. Change-Id: I69236026eecb9d08a9a66e51752a80ea522b0c6a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Bazel: Add missing dependency on mockito for TransportHttpTestDavid Pursehouse2019-06-071-0/+4
| | | | | | | | | | Change-Id: I54eff21c7aa8ee4b3b4a2fea60c5bca359256808 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Determine hard-linking and nlink support per FileStoreThomas Wolf2019-06-061-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's quite possible that JGit can use the hard-linking mechanism for atomic file creation on some volumes but not on others. Ultimately it depends on the file systems on the mounted volumes. Cache the information per FileStore instead of using a single global flag. Also catch FileSystemException, it may be thrown if the operating system reports a failure. The previously caught AccessDeniedException is a sub-class of FileSystemException. Bug: 547332 Change-Id: I1ef672b3468b0be79e71674344f16f28f9d11ba1 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Support reading and writing cookies.Konrad Windszus2019-06-0618-1/+1774
| | | | | | | | | | | | | | | | | | The git config entries "http.cookieFile" and "http.saveCookies" are correctly evaluated. Bug: 488572 Change-Id: Icfeeea95e1a5bac3fa4438849d4ac2306d7d5562 Signed-off-by: Konrad Windszus <konrad_w@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Repository: Add getIdentifier() method to avoid instanceof operatorDavid Ostrovsky2019-06-056-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is needed to implement permission aware ref database in Gerrit: [1], that is a pre-requisite to re-enable Git v2 protocol in Gerrit: [2]. Background: Last year Git v2 protocol was enabled in Gerrit. The fact, that JGit layer was not calling ref advertise filter for Git v2 protocol, introduced security vulnerability. The lesson learned from this security incident: Gerrit should not rely on ref advertise filter being called by JGit to implement crictical security checks. Instead, the idea is to use the same approach as currently used by Google's internal code on googlesource.com that didn't suffer from this vulnerability: provide a custom repository to JGit. The repository provides a RefDatabase that is permission-aware and will only ever return refs that the user has access to. However, due to hard coded instanceof operator usages in JGit code base, some tests in Gerrit are failing with: [1] in place. This change addresses this problem. [1] https://gerrit-review.googlesource.com/c/gerrit/+/212874 [2] https://gerrit-review.googlesource.com/c/gerrit/+/226754 Change-Id: I67c0f53ca33b149442e7ee3e51910d19e3f348d5 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update to Orbit R20190602212107Matthias Sohn2019-06-0315-75/+78
| | | | | | | | | | | | | | | | | | This version fixed wrong Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9))" in bouncycastle 1.61. Bug: 547570 Change-Id: I715bcc4b39c3d4ad036dcc5bbdf48d321759f55f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | PacketLineIn: Deprecate the END constantDavid Pursehouse2019-06-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | Deprecate the constant with the intention of making it private in a future release. All existing usage of the constant within JGit code has already been replaced with the recommended alternatives in preceding commits. Change-Id: I10eb95f3f92cb74f93a26bf1a6edd24615b75c6f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>