summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* Suppress API error for new constant Ref.UNDEFINED_UPDATE_INDEXMatthias Sohn2019-03-301-0/+8
| | | | Change-Id: If8f7c9cc4b78ce2de29b0d93f2b98c2d0dd1eb3d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* DfsRefDatabase: Keep update index when peeling a referenceIvan Frade2019-03-292-7/+14
| | | | | | | | | | | | | The new references created in the peeling do not receive the update index. In other words, the update index of a reference (if set) is lost in the peeling. Pass-through the update index to the newly created references. Tested via InMemoryRepository, which uses DfsReftableDatabase. Change-Id: I7ff7c737a9c3366fdec296a4d9b2e51d10227957 Signed-off-by: Ivan Frade <ifrade@google.com>
* Ref: Add constant for undefined update indexIvan Frade2019-03-293-6/+13
| | | | | | | | | | | Code that creates references and wants to support ref dbs with and without update indexes needs to set this value. This leds to a proliferation of "-1" in the code base. Make the "undefined" value a constant in the ref interface. Change-Id: I2622a37536a84b4a4036dd55792e185486fa0628 Signed-off-by: Ivan Frade <ifrade@google.com>
* Clarify error message for invalid Windows charactersHan-Wen Nienhuys2019-03-291-2/+2
| | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I20c37d70fc78d745f83b9ce702777535b16b8dfe
* Fix API error filter settingsMatthias Sohn2019-03-271-11/+2
| | | | | | | | | | - UploadPack.getFilterBlobLimit() didn't have a wrong @since tag but was marked final shortly after 5.3 was released. This was probably caused by using an outdated API baseline. Currently we should use 5.3.0 as the baseline. - remove unused filter on FS.fileAttributes() Change-Id: I9adc1703e99a9ddb3ea2a1c12a83dccbc1f69a99 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Justify API-breaking changes introduced in 4cd9548Matthew DeVore2019-03-251-0/+23
| | | | | | | | Use .api_filters to suppress API baseline errors. The justification is included in comments in that file. Change-Id: I7b5c69d8d13733719b28ef7317fc9780ed2828d8 Signed-off-by: Matthew DeVore <matvore@gmail.com>
* ObjectWalk: simplify tree traversal logicMatthew DeVore2019-03-221-16/+13
| | | | | | | | Inline newTreeVisit into enterTree and call the new method pushTree. Use pushTree both for pushing children of the existing currVisit. Change-Id: I75ea37f48b2befb738a3e88bed40ac08f1df9a03 Signed-off-by: Matthew DeVore <matvore@gmail.com>
* Expose and pass around the FilterSpec object rather than the raw blob limitMatthew DeVore2019-03-225-26/+84
| | | | | | | | | Use the FilterSpec object so that less code has to know about the make-up of FilterSpecs. When fields are added to FilterSpec, these pieces of code won't need updating again. Change-Id: I2b9e59a9926ff112faf62a3fa2d33c961a1779e5 Signed-off-by: Matthew DeVore <matvore@gmail.com>
* Put filter spec information in a dedicated objectMatthew DeVore2019-03-227-40/+86
| | | | | | | | This increases type-safety and is ground work for support of the "tree:<depth>" filter. Change-Id: Id19eacdcdaddb9132064c642f6d554b1060efe9f Signed-off-by: Matthew DeVore <matvore@gmail.com>
* Use Objects.requireNonNull instead of a custom helperJonathan Nieder2019-03-222-26/+2
| | | | | | | This simplifies the API surface and makes JGit internals into less of a custom Java dialect. Change-Id: Idbb7d4d1037c5336341088385b8e0a59c8b4c952
* Introduce a checkNotNull helperJonathan Nieder2019-03-222-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using @NonNull annotations in new code, if I write public void setFrobber(@NonNull frobber) { this.frobber = frobber; } then consumers of the JGit library that do not have nullness checking enabled can easily pass in null by mistake. On the other hand, if I write public void setFrobber(@NonNull frobber) { if (frobber == null) { throw new NullPointerException(); } this.frobber = frobber; } then Eclipse JDT complains: Null comparison always yields false: The variable frobber is specified as @NonNull Add a checkNotNull helper that offers the best of both worlds: public void setFrobber(@NonNull frobber) { this.frobber = checkNotNull(frobber); } Briefer code, null check is intact, and no warning. Inspired by Guava's com.google.common.base.Preconditions.checkNotNull. Change-Id: If59588d13a1119e899657ed2296931ea18ed0e2a
* Merge branch 'stable-5.3'Matthias Sohn2019-03-211-2/+5
|\ | | | | | | | | | | | | | | * stable-5.3: Fix GC to delete empty fanout directories after repacking Change-Id: I080ddb03c6143f0bfa24707a10a4d926676d32b1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-03-211-2/+5
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Fix GC to delete empty fanout directories after repacking Change-Id: I29e1da15396daaf0036bcb92cfb567cc243db5a1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-03-211-2/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Fix GC to delete empty fanout directories after repacking Change-Id: I0cf4d26bdee5ecee43e723c4176efbce777acabc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-5.0' into stable-5.1Matthias Sohn2019-03-211-2/+5
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Fix GC to delete empty fanout directories after repacking Change-Id: I5c0e7d59f137c27e4588f20f4472d3ea450cd59c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2019-03-211-2/+5
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Fix GC to delete empty fanout directories after repacking Change-Id: Idce894a24e126e0fbe7bc9b6a3c64318f1a8eb75 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2019-03-211-2/+5
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Fix GC to delete empty fanout directories after repacking Change-Id: I7118b9c668dcbb0f5435cc613e964c557bfebf01 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2019-03-211-2/+5
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Fix GC to delete empty fanout directories after repacking Change-Id: Ibdbfe08eb290286fa738010bad1c604e857885cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Fix GC to delete empty fanout directories after repackingMatthias Sohn2019-03-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The prune method did not delete empty fanout directories when loose objects moved to a new pack file but only when loose unreferenced objects were pruned. Change-Id: Ia068f4914c54d9cf9f40b75e8ea50759402b5000 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Move filter-line-parsing code to a separate fileMatthew DeVore2019-03-203-40/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is not specific to V2 of the protocol, so it doesn't belong there. Move it to its own class. Change-Id: I8084764147d1d0e2bceaaead59b332a8ec1a0825 Signed-off-by: Matthew DeVore <matvore@gmail.com>
* | | | | | | | Use RefMap instead of HashMapMasaya Suzuki2019-03-203-6/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HashMap<String, Ref> has a memory overhead for refs. Use RefMap. Change-Id: I3fb4616135dacf687cc3bc2b473effc66ccef5e6 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* | | | | | | | DescribeCommand: Add a missing dots at the end of docsSebastian Schuberth2019-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure the sentences to document fields consistenly end with a dot. Change-Id: I084899cafe4dea6f2424132dce9f3adca2e20985 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
* | | | | | | | Replace "Checkout" by "Check out" when used as a verbThomas Wolf2019-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One occurrence in core JGit, several in jgit.pgm. One unused occurrence in jgit.pgm; remove it. Change-Id: I04c3dd9d9f542f1e1ac6df4cbf03bcefb6bfdf78 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | BaseReceive/UploadPack: Stop using deprecated RefAdvertiser.send(Map)Ivan Frade2019-03-142-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RefAdvertiser.send(Map<String, Ref>) is deprecated in favour of RefAdvertiser.send(Collection<Ref>). Subclasses that need to override the "send" method need to override also the deprecated version, because it is still invoked by BaseReceivePack and UploadPack. Remove the last usages of the deprecated method. Change-Id: I7eba426970251f78801ddf96b87a65d1baaebdcf Signed-off-by: Ivan Frade <ifrade@google.com>
* | | | | | | | Merge branch 'stable-5.3'Matthias Sohn2019-03-136-91/+95
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.1-SNAPSHOT builds JGit v5.3.0.201903130848-r Prepare 5.1.7-SNAPSHOT builds JGit v5.1.6.201903130242-r Prepare 4.11.8-SNAPSHOT builds JGit v4.11.7.201903122105-r Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: Ief9f6a9e89c4a1ef122daedbfd933676393fab06 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Prepare 5.3.1-SNAPSHOT buildsMatthias Sohn2019-03-133-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8dc5e47bd19809d684579610edf922abca3cb3cc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | JGit v5.3.0.201903130848-rv5.3.0.201903130848-rMatthias Sohn2019-03-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I52256a6d07011030698299d9a97dd01ea825fb7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-03-136-87/+99
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.7-SNAPSHOT builds JGit v5.1.6.201903130242-r Prepare 4.11.8-SNAPSHOT builds JGit v4.11.7.201903122105-r Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: Ia866587a910e620cb297bcb2a81fe0786f4e3db2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-03-136-79/+99
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.7-SNAPSHOT builds JGit v5.1.6.201903130242-r Prepare 4.11.8-SNAPSHOT builds JGit v4.11.7.201903122105-r Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I8da2761ed27ff2817a4136f843b9b293e3c0f4e6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Prepare 5.1.7-SNAPSHOT buildsMatthias Sohn2019-03-133-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ica716b2ad18f8390e75466430ef81c86ea06f004 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | JGit v5.1.6.201903130242-rv5.1.6.201903130242-rMatthias Sohn2019-03-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaf5e451f72dc8512afee99a9f3fb91aa348e3cf5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Merge branch 'stable-5.0' into stable-5.1Matthias Sohn2019-03-136-13/+99
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Prepare 4.11.8-SNAPSHOT builds JGit v4.11.7.201903122105-r Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I71771dcc086a9a0097bad74d65ec71ad97106a38 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2019-03-136-13/+97
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Prepare 4.11.8-SNAPSHOT builds JGit v4.11.7.201903122105-r Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I04c70f66c6f1e53bdc199fb5b24c9136c9a8e4f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | Prepare 4.11.8-SNAPSHOT buildsMatthias Sohn2019-03-133-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I92789b0c02e83786961b81556bf2faec5d26b0c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | JGit v4.11.7.201903122105-rv4.11.7.201903122105-rMatthias Sohn2019-03-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4fc62c304b5a8452ca72a3b305e5732a26120000 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2019-03-136-13/+97
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: Ic66dc00455c05f7627919f682a7221ffeef1629d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2019-03-136-13/+97
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.9.10-SNAPSHOT builds JGit v4.9.9.201903122025-r Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: Ifcd8ea6a2b59f6f8e9d896d8407cfcaef0a9375d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Prepare 4.9.10-SNAPSHOT buildsMatthias Sohn2019-03-133-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2bdbe822ee623c5f15a26d092136d8602cef06ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * JGit v4.9.9.201903122025-rv4.9.9.201903122025-rMatthias Sohn2019-03-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I807d24461b3557eee48294bfaa652b2a13d78113 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2019-03-136-13/+97
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I9a47153831f8eb10d3cd91b4157cf45385e5b13a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2019-03-136-13/+97
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.9-SNAPSHOT builds JGit v4.7.8.201903121755-r Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I1136eaa1590b225ceaf16ba7552af0374253a74e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Prepare 4.7.9-SNAPSHOT buildsMatthias Sohn2019-03-123-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1602a6b811fd9f95e284153b560d8d9f855fae9f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * JGit v4.7.8.201903121755-rv4.7.8.201903121755-rMatthias Sohn2019-03-123-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia6dbde615671ed09789326aacad1655e7a7a59ad Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2019-03-126-13/+97
| | | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I3d1544d034783fe0fa1385dfe9b03ad8e9247c63 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2019-03-126-13/+113
| | | | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.5.7-SNAPSHOT builds JGit v4.5.6.201903121547-r Check for packfile validity and fd before reading Move throw of PackInvalidException outside the catch Use FileSnapshot to get lastModified on PackFile Include size when comparing FileSnapshot Do not reuse packfiles when changed on filesystem Silence API warnings for new API introduced for fixes Change-Id: I029e1797447e6729de68bd89d4d69b324dbb3f5f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | | | * Prepare 4.5.7-SNAPSHOT buildsMatthias Sohn2019-03-123-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5c275c542e12746c3d8ecf8462791969f9e89e12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | | | * JGit v4.5.6.201903121547-rv4.5.6.201903121547-rMatthias Sohn2019-03-123-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5a071ed10e1ac1ab28f992d45cde335c12556a80 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | | | * Check for packfile validity and fd before readingLuca Milanesio2019-03-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading from a packfile, make sure that is valid and has a non-null file-descriptor. Because of concurrency between a thread invalidating a packfile and another trying to read it, the read() may result into a NPE that won't be able to be automatically recovered. Throwing a PackInvalidException would instead cause the packlist to be refreshed and the read to eventually succeed. Bug: 544199 Change-Id: I27788b3db759d93ec3212de35c0094ecaafc2434 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
| | | | | | | | | | | * Move throw of PackInvalidException outside the catchLuca Milanesio2019-03-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a packfile is invalid, throw an exception explicitly outside any catch scope, so that is not accidentally caught by the generic catch-all cause, which would set the packfile as valid again. Flagging an invalid packfile as valid again would have dangerous consequences such as the corruption of the in-memory packlist. Bug: 544199 Change-Id: If7a3188a68d7985776b509d636d5ddf432bec798 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
| | | | | | | | | | | * Use FileSnapshot to get lastModified on PackFileLuca Milanesio2019-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not redundantly call File.lastModified() for extracting the timestamp of the PackFile but rather use consistently the FileSnapshot which reads all file attributes in a single bulk call. Change-Id: I932675ae4fe56dcd3833dac249816f097303bb09 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>