summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-5.10'Matthias Sohn2020-12-222-3/+3
|\ | | | | | | | | | | | | | | * stable-5.10: Update jgit-4.18 target platform to use release repository Change-Id: I1bc7b6d38085ba31fa65ad882a4f991da27bbf72 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Update jgit-4.18 target platform to use release repositoryMatthias Sohn2020-12-172-3/+3
| | | | | | | | Change-Id: I62aaf1cb823e05f277b16b156d0f9a4928efe213
* | Revert "Remove unused API problem filters"Matthias Sohn2020-12-221-0/+11
| | | | | | | | | | | | | | | | | | This reverts commit 022b02dea10612cb01f9694212b72bd1bbd69cb9. Removing this API warning filter was wrong since we intentionally removed the config constant CONFIG_REFSTORAGE_REFTREE. Change-Id: Ie068e539157cc2312efc8a07feabeb0dd2f75096 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove unused API problem filtersMatthias Sohn2020-12-171-11/+0
| | | | | | | | | | Change-Id: Id533cf598cd37c277b4de06fdd8ae74cfeede4d0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in FS#writeMatthias Sohn2020-12-171-1/+4
| | | | | | | | | | | | Path#getParent can return null. Change-Id: I01f13ac426dda4c007cc5caab546a0c9be62ce76 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in PackFileSnapshotTestMatthias Sohn2020-12-171-2/+6
| | | | | | | | | | | | | | Path#getFileName can return null. Fix the warning by asserting the file name isn't null. Change-Id: I7f2fe75b46113d8be1d14e3f18dd77da27df25ed Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPEs in FileReftableStackTestMatthias Sohn2020-12-171-7/+12
| | | | | | | | | | | | | | File#listFiles can return null. Use Files#list instead to fix the problem. Change-Id: I74e0b49aa6dae370219507c64aa43be4d8aa7b82 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in WorkingTreeIterator#isModifiedMatthias Sohn2020-12-171-2/+4
| | | | | | | | | | | | | | | | File#list can return null. Fix the potential NPE by using Files#list which is also faster since it retrieves directory entries lazily while File#list retrieves them eagerly. Change-Id: Idf4bda398861c647587e357326b8bc8b587a2584 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in FileBasedConfigTestMatthias Sohn2020-12-171-3/+10
| | | | | | | | | | | | | | Path#getParent can return null. Fix the warning by implementing a helper method which asserts the parent is not null. Change-Id: Ib4f8dff0674b74bc891f15f08bd9755c5ea728dc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in GcPruneNonReferencedTestMatthias Sohn2020-12-171-0/+2
| | | | | | | | | | | | | | | | File#listFiles can return null, assert it is not null to fix the warning. Change-Id: I28fc668fee760d39965e6e039003ac9f85fd461b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] Fix potential NPE in FileRepository#convertToReftableMatthias Sohn2020-12-171-1/+3
| | | | | | | | | | | | | | | | File#listFiles can return null. Use Files#list which does not return null and should be faster since it's returning directory entries lazily while File#listFiles fetches them eagerly. Change-Id: I3bfe2a52278244fc469143692c06b05d9af0d0d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] silence warnings for intended use of == to compare stringsMatthias Sohn2020-12-171-2/+20
| | | | | | | | Change-Id: Ib6967ad4deb5cf233d1f1d714cd094da5fad48e3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] silence short-circuit warning in PackOutputStream#writeMatthias Sohn2020-12-171-0/+6
| | | | | | | | Change-Id: I47b7a7991afae0dd1e678bd5e1f8e81599791e5f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [spotbugs] parse time using thread-safe DateTimeFormatterMatthias Sohn2020-12-171-5/+9
| | | | | | | | | | | | | | LfsConnectionFactory used a static SimpleDateFormat which isn't thread-safe. Use DateTimeFormatter instead to fix this. Change-Id: Id580251c999e1e412c269f37b29860d310124c89 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | FetchProcess#execute: fix formattingMatthias Sohn2020-12-171-2/+3
| | | | | | | | Change-Id: I133af64e6b165bdc58b8d7c805f0c68b6919baf2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [errorprone] FetchProcess: ensure exception isn't suppressedMatthias Sohn2020-12-171-0/+7
| | | | | | | | | | | | | | | | If TransportException is thrown in the finally block of execute() ensure that the exception handled in the previous catch block isn't suppressed. Change-Id: I670acdfb4d36e7a419a9a79ae9faab2e085a43ee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [errorprone] WalkFetchConnection: ensure exception isn't suppressedMatthias Sohn2020-12-171-0/+5
| | | | | | | | | | | | | | | | If TransportException is thrown in the finally block of downloadPackedObject() ensure that the exception handled in the previous catch block isn't suppressed. Change-Id: I23982a2b215e38f681cc1719788985e60232699a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove unused API problem filtersMatthias Sohn2020-12-151-52/+0
| | | | | | | | Change-Id: I982f21dfaec4e35818eca7a4793e24a2cec4e467 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove reftree and ketchHan-Wen Nienhuys2020-12-1553-7805/+13
| | | | | | | | | | | | | | This was experimental code and never used in production. Change-Id: Ia3da7f2b82d9e365cec2ccf9397cbc47439cd150 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | LsRemote: suppress warning for non-externalized stringMatthias Sohn2020-12-151-1/+1
| | | | | | | | Change-Id: Ic1d8f2eef4a8de0a75d5b523b584b1ac275a8811 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | LooseObjects: fix formattingMatthias Sohn2020-12-151-13/+13
| | | | | | | | Change-Id: I992e5066d1dc4603e5bae991b26605d319f5cdc2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Split out loose object handling from ObjectDirectoryMartin Fick2020-12-152-120/+245
| | | | | | | | | | | | | | | | | | | | | | | | The ObjectDirectory class manages the interactions for the entire object database, this includes loose objects, packfiles, alternates, and shallow commits. To help reduce the complexity of this class, abstract some of the loose object specific details into a class which understands just this, leaving the ObjectDirectory to focus more on the interactions between the different mechanisms. Change-Id: I39f3a74d6308f042a2a2baa57769f4acde5ba5e0 Signed-off-by: Martin Fick <mfick@codeaurora.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.9'Matthias Sohn2020-12-141-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Fix stamping to produce stable file timestamps Change-Id: Icd092cd9b883556fcbd115c17346a9d88dc172ce Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Fix stamping to produce stable file timestampsDavid Ostrovsky2020-12-141-1/+1
| | | | | | | | | | | | Change-Id: I628ab5feb4a70f81ec832f1b81d1ad3a9caca615
* | | PackDirectory: fix formattingMatthias Sohn2020-12-121-24/+41
| | | | | | | | | | | | Change-Id: I10586981323529c7e9041110ebb58033e7180194 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Split out packfile handling from ObjectDirectoryMartin Fick2020-12-122-377/+513
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ObjectDirectory class manages the interactions for the entire object database, this includes loose objects, packfiles, alternates, and shallow commits. To help reduce the complexity of this class, abstract some of the packfile specific details into a class which understands just this, leaving the ObjectDirectory to focus more on the interactions between the different mechanisms. Change-Id: I5cc87b964434b0afa860b3fe23867a77b3c3a4f2 Signed-off-by: Martin Fick <mfick@codeaurora.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | TagCommand: propagate NO_CHANGE informationThomas Wolf2020-12-083-36/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some clients may wish to allow NO_CHANGE lightweight tag updates without setting the force flag. (For instance EGit does so.) Command-line git does not allow this. Propagate the RefUpdate result via the RefAlreadyExistsException. That way a client has the possibility to catch it and check the failure reason without having to parse the exception message, and take appropriate action, like ignoring the exception on NO_CHANGE. Change-Id: I60e7a15a3c309db4106cab87847a19b6d24866f6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | TagCommand: make -f work with lightweight tags for NO_CHANGEThomas Wolf2020-12-082-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | JGit treated a NO_CHANGE RefUpdate as an error in all cases. But when updating a lightweight tag, this is a successful result if -f was specified. Change-Id: Iddfa6d6a6dc8bf8fed81138a008ebc32d5f960bd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Merge branch 'stable-5.10'Matthias Sohn2020-12-080-0/+0
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * stable-5.10: Prepare 5.10.1-SNAPSHOT builds JGit v5.10.0.202012080955-r Change-Id: I751f55944d2aebbd622dda8acd8c113208a972eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 5.10.1-SNAPSHOT buildsMatthias Sohn2020-12-0888-506/+506
| | | | | | | | | | | | | | | Change-Id: If1e44edfa0a80a29c00ed5112291d1338baf56f1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.10.0.202012080955-rv5.10.0.202012080955-rMatthias Sohn2020-12-0888-121/+121
| | | | | | | | | | | | | | | Change-Id: I7ca88bcc54992625a6fafd84172adee58d487dc3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | TagCommand: support signing annotated tagsThomas Wolf2020-12-078-45/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the two config constants from C git that can switch on signing of annotated tags. Add them to the GpgConfig, and implement actually signing a tag in TagCommand. The interactions between command line options for "git tag" and config options is a bit murky in C git. There are two config settings for it: * tag.gpgSign is the main option, if set to true, it kicks in if neither -s nor -u are given on the command line. * tag.forceSignAnnotated signs only tags created via "git tag -m", but only if command-line option "-a" is not present. It applies even if tag.gpgSign is set explicitly to false. Giving -s or -u on the command line also forces an annotated tag since lightweight tags cannot be signed. Bug: 386908 Change-Id: Ic8a1a44b5f12f47d5cdf3aae2456c1f6ca9ef057 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Enable GpgSigner to also sign tagsThomas Wolf2020-12-0711-224/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out a common ObjectBuilder as super class of CommitBuilder and TagBuilder, and make the GpgSigner work on ObjectBuilder. In order not to break API, add the new method for signing an ObjectBuilder in a new interface GpgObjectSigner. The signature for a tag is just tacked onto the end of the tag message. The message of a signed tag must end in LF. Bug: 386908 Change-Id: I5e021e3c927f4051825cd7355b129113b949455e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Merge branch 'stable-5.10'Matthias Sohn2020-12-038-126/+133
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Prepare 5.10.0-SNAPSHOT builds JGit v5.10.0.202012021225-rc1 Don't install 3rd party dependency bundles via features Change-Id: Ia901830d1057667dc8e78d235c63f84373f8887b
| * | Prepare 5.10.0-SNAPSHOT buildsMatthias Sohn2020-12-0288-121/+121
| | | | | | | | | | | | | | | Change-Id: I9cc9fa32a737b4916cdb5b52bac8f724ebee09bc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.10.0.202012021225-rc1v5.10.0.202012021225-rc1Matthias Sohn2020-12-0288-121/+121
| | | | | | | | | | | | | | | Change-Id: Ic774356e09bb9d24e5d99334bd4ea173bd4071ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Don't install 3rd party dependency bundles via featuresMatthias Sohn2020-12-028-126/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead provide them only in the p2 repository. This way they are available when installing from the jgit p2 repository but we are not enforcing the version we bring but can also use the version available in Eclipse if it matches our requirements. Bug: 514326 Bug: 566475 Change-Id: I3e8d0bad12cfb0c1003ade3e6f13e9af35626f14 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'master' into stable-5.10Matthias Sohn2020-12-0253-114/+625
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Upgrade maven-pmd-plugin to 3.14.0 Update Orbit to R20201130205003 for 2020-12 Use new protocol version constants PacketLineInTest: test for END and DELIM being distinguishable Add constants for parsing git wire protocol version Ignore missing javadoc tags in test bundles Bazel: Allow to build and run the tests with JDK 15 [releng] japicmp: update last release version Add support for reading symrefs from pack capabilities Change-Id: I5afbbb912f502991f0cf9c2501b024f5f00144ba Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Prepare 5.11.0-SNAPSHOT buildsMatthias Sohn2020-12-0288-506/+506
| |/ / |/| | | | | | | | | | | Change-Id: I91e5532526775191fbd34f81e2ef777cba605e3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-5.9'Matthias Sohn2020-12-021-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: I3cf6c71e8310c1d7ef333d4a9c23fa41f45118c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-5.8' into stable-5.9Matthias Sohn2020-12-021-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.8: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: I08caea979ac4c1298b453e6e5558bccb86fb0181 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * \ Merge branch 'stable-5.7' into stable-5.8Matthias Sohn2020-12-021-0/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.7: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: I638ee6409f25ac8bcb2e365b1c37939b520b289f
| | | * \ Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2020-12-021-0/+1
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: If5f001c414e677bb2bac59714421f0191b23ea1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * \ Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-12-021-0/+1
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: I986029816ef66fbfae1a59bd97179392320a485c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * \ Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-12-021-0/+1
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: Iede8686198332d6271771bef6eb00c25f1103979 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * \ Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-12-021-0/+1
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.10-SNAPSHOT builds JGit v5.3.9.202012012026-r Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: I319b54ceffe095add60420c6ae83eac0ba9c14b6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * | Prepare 5.3.10-SNAPSHOT buildsMatthias Sohn2020-12-0269-428/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6f131ad04574bd0d569ae6a59c29ea987be0efb2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * | JGit v5.3.9.202012012026-rv5.3.9.202012012026-rMatthias Sohn2020-12-0269-90/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I75e03ef8630d7a369e97be0f797253b968575354 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-12-021-0/+1
| | | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: If1d8034b5e0cbc004a11a31b228cb5732efb390d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | * \ Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2020-12-021-0/+1
| | | | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.16-SNAPSHOT builds JGit v5.1.15.202012011955-r Fix PackInvalidException when fetch and repack run concurrently Change-Id: Id83e29e567646a3945a5b817860ea8f7c3e6e5cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>