aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2021-05-113-22/+13
|\ | | | | | | | | | | | | | | * stable-5.6: Remove texts which were added by mistake in 00386272 Fix formatting which was broken in 00386272 Change-Id: I45d444b360485564744bf3dfad2c2f5a5e7fcdf6
| * Remove texts which were added by mistake in 00386272Matthias Sohn2021-05-112-8/+0
| | | | | | | | Change-Id: Iaed25dac0bc9af8f3fda6138a5f9fe553bff5d39 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix formatting which was broken in 00386272Matthias Sohn2021-05-111-14/+13
| | | | | | | | Change-Id: I10a3e2b117e790f64386a8e9e7663db8e59230d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2021-05-113-34/+104
|\| | | | | | | | | | | | | * stable-5.6: LockFile: create OutputStream only when needed Change-Id: I7c0e37d2cee0923662a7e39df5a802a84c017e4f
| * LockFile: create OutputStream only when neededThomas Wolf2021-05-103-108/+112
| | | | | | | | | | | | | | | | | | | | | | Don't create the stream eagerly in lock(); that may cause JGit to exceed OS or JVM limits on open file descriptors if many locks need to be created, for instance when creating many refs. Instead create the output stream only when one really needs to write something. Bug: 573328 Change-Id: If9441ed40494d46f594a896d34a5c4f56f91ebf4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Remove ReftableNumbersNotIncreasingExceptionHan-Wen Nienhuys2021-03-011-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a distributed setting, one can have multiple datacenters use reftables for serving, while the ground truth for the Ref database is administered centrally. In this setting, replication delays combined with compaction can cause update-index ranges to overlap. Such a setting is used at Google, and the JGit code already handles this correctly (modulo a bugfix that applied in change I8f8215b99a). Remove the restriction that was applied at FileReftableDatabase. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I6f9ed0fbd7fbc5220083ab808b22a909215f13a9
* | 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-023-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6f131ad04574bd0d569ae6a59c29ea987be0efb2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * JGit v5.3.9.202012012026-rv5.3.9.202012012026-rMatthias Sohn2020-12-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | | | * Prepare 5.1.16-SNAPSHOT buildsMatthias Sohn2020-12-023-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I50e59e1e73a92fa4fe366398fb8141f5e2e289c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * JGit v5.1.15.202012011955-rv5.1.15.202012011955-rMatthias Sohn2020-12-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icb4f04a40ab366cbacbb3fdf0db1748f27277fda Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Fix PackInvalidException when fetch and repack run concurrentlyPetr Hrebejk2020-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are running several servers with jGit. We need to run repack from time to time to keep the repos performant. I.e. after push we test how many small packs are in the repo and when a threshold is reached we run the repack. After upgrading jGit version we've found that if someone does the clone at the time repack is running the clone sometimes (not always) fails because the repack removes .pack file used by the clone. Server exception and client error attached. I've tracked down the cause and it seems to be introduced between jGit 5.2 (which we upgraded from) and 5.3 and being caused by this commit: Move throw of PackInvalidException outside the catch - https://github.com/eclipse/jgit/commit/afef866a44cd65fef292c174cad445b3fb526400 The problem is that when the throw was inside of the try block the last catch block catched the exception and called openFailed(false) method. It is true that it called it with invalidate = false, which is wrong. The real problem though is that with the throw outside of the try block the openFail is not called at all and the fields activeWindows and activeCopyRawData are not set to 0. Which affects the later called tests like: if (++activeCopyRawData == 1 && activeWindows == 0). The fix for this is relatively simple keeping the throw outside of the try block and still having the invalid field set to true. I did exhaustive testing of the change running concurrent clones and pushes indefinitely and with the patch applied it never fails while without the patch it takes relatively short to get the error. See: https://www.eclipse.org/lists/jgit-dev/msg04014.html Bug: 569349 Change-Id: I9dbf8801c8d3131955ad7124f42b62095d96da54 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | Silence API warningsMatthias Sohn2020-11-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5de476935e79f8f0beefc27885cbc3ffe31c0aed Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2020-11-273-5/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Prepare 5.3.9-SNAPSHOT builds JGit v5.3.8.202011260953-r Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: Ie24d381f295cccfb99068c7ed5817179da29c1db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-11-273-5/+15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Prepare 5.3.9-SNAPSHOT builds JGit v5.3.8.202011260953-r Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: I00c8ddad0059a20a978743dfb7ad1b513dc7fef6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-11-274-7/+15
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Prepare 5.3.9-SNAPSHOT builds JGit v5.3.8.202011260953-r Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: Icc34f809a3bb019d8d640b9bdb71363e617942e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-11-274-7/+15
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.9-SNAPSHOT builds JGit v5.3.8.202011260953-r Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: I82576ad0f61cf3ff11b54691b32666c61401ad9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | Prepare 5.3.9-SNAPSHOT buildsMatthias Sohn2020-11-263-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I69f181453c79cef2b4f43fac38d9836917cdc973 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | JGit v5.3.8.202011260953-rv5.3.8.202011260953-rMatthias Sohn2020-11-263-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7b128942ef224335f415f867c2d9d5da7498ed8b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-11-264-7/+15
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: Id9386846a202b5ae98dd602744963f8897ddaa8c
| | | | | * | Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2020-11-264-7/+15
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.15-SNAPSHOT builds JGit v5.1.14.202011251942-r GC#deleteOrphans: log warning for deleted orphaned files GC#deleteOrphans: handle failure to list files in pack directory Ensure that GC#deleteOrphans respects pack lock Update API warning filters Remove unused imports Change-Id: I91cfe2820c40d2d773cbf018cc2a6c36b062801e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Prepare 5.1.15-SNAPSHOT buildsMatthias Sohn2020-11-263-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I70246b66c76e865aef4e3adada3a507750ca7c63 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * JGit v5.1.14.202011251942-rv5.1.14.202011251942-rMatthias Sohn2020-11-263-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibe124988be39feaa029c3770777126dd87b18abc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * GC#deleteOrphans: log warning for deleted orphaned filesMatthias Sohn2020-11-263-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie245bf5c8c924dfb1f0f40b8bcdcb1e6f5815526 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * GC#deleteOrphans: handle failure to list files in pack directoryMatthias Sohn2020-11-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - log an error - either there is no list or it is incomplete hence return immediately Change-Id: Ieee5378ca06304056b9ccc30c1acd5f52360052d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Ensure that GC#deleteOrphans respects pack lockMatthias Sohn2020-11-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If pack or index files are guarded by a pack lock (.keep file) deleteOrphans() should not touch the respective files protected by the lock file. Otherwise it may interfere with PackInserter concurrently inserting a new pack file and its index. The problem was caused by the following race. All mentioned files are located in "objects/pack/". File endings relevant in "pack" dir: .pack .keep .idx .bitmap When ReceivePack receives a pack file it executes the following steps: ReceivePack.service(): receivePackAndCheckConnectivity(): receivePack(): receive the pack parse the pack, returns packLock (.keep file) PackInserter.flush(): write tmpPck file: "insert_<random>.pack" write tmpIdx file: "insert_<random>.idx" real pack name: "pack-<SHA1>.pack" real index name: "pack-<SHA1>.idx" atomic rename tmpPack to realPack atomic rename tmpIdx to tmpIdx execute commands unlock pack by removing .keep file trigger auto gc if enabled When PackInserter.flush() renames the temporary pack to the final "pack-xxx.pack" file the temporary pack index file "insert_xxx.idx" has no matching .pack file with the same base name for a short interval. If deleteOrphans() ran during that interval it deduced the pack index file was orphaned. Subsequently the missing pack index caused MissingObjectExceptions since objects contained in the pack couldn't be looked up anymore. Bug: https://bugs.chromium.org/p/gerrit/issues/detail?id=13544 Change-Id: I559c81e4b1d7c487f92a751bd78b987d32c98719 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Update API warning filtersMatthias Sohn2020-07-191-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0fa9c7725ee15da9a932dab0abfb2525d2401149 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Remove unused importsMatthias Sohn2020-07-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7c44e3603df2dd368cb7c0ba0072413b887b6903 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Prepare 5.1.14-SNAPSHOT buildsMatthias Sohn2020-02-113-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7d6f1a6c3123af1a1fa782f052b0cea3b6f28c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * JGit v5.1.13.202002110435-rv5.1.13.202002110435-rMatthias Sohn2020-02-113-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iedc8699ad1a24efe7ddb47ae919c75b9d36141d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | Prepare 5.3.8-SNAPSHOT buildsMatthias Sohn2020-02-113-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I64ef3b4cf30e87d058001c2c6f1458f4b0c1df00 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | JGit v5.3.7.202002110540-rv5.3.7.202002110540-rMatthias Sohn2020-02-113-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3ba41af516b9d3b74ac580b3e170ad0e6e0663d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | ObjectDirectoryInserter: Open FileOutputStream in try-with-resourceDavid Pursehouse2020-06-051-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icc569aeefdc79baee5dfb71fb34d881c561dcf52 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | ObjectDirectoryInserter: Remove redundant 'throws' declarationsDavid Pursehouse2020-06-051-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObjectWritingException and FileNotFoundException are subclasses of IOException, which is already declared. Error does not need to be explicitly declared. Change-Id: I879820a33e10ec3a7ef676adc9c9148d2b3c4b27 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | ObjectDirectory: Further clean up insertUnpackedObjectDavid Pursehouse2020-06-051-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The code to move the file is repeated. Split it out into a utility method. - Remove the catch block for AtomicMoveNotSupportedException which is redundant because it's handled in exactly the same way as the IOException further down. The only exception we need to explicitly handle differently in this block is NoSuchFileException. - Improve the comments. Change-Id: Ifc5490953ffb25ecd1c48a06289eccb3f19910c6 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | ObjectDirectory: Explicitly handle NoSuchFileExceptionDavid Pursehouse2020-06-041-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the first attempt to move the temp file, NoSuchFileException can be raised if the destination folder does not exist. Instead of handling this implicitly in the catch of IOException and then continuing to create the destination folder and try again, explicitly catch it and create the destination folder. If any other IOException occurs, treat it as an unexpected error and return FAILURE. Subsequently, on the second attempt to move the temp file, if ANY kind of IOException occurs, also consider this an unexpected error and return FAILURE. In both catch blocks for IOException, add logging at ERROR level. Change-Id: I9de9ee3d2b368be36e02ee1c0daf8e844f7e46c8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | ObjectDirectory: Fail immediately when atomic move is not supportedDavid Pursehouse2020-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If atomic move is not supported, AtomicMoveNotSupportedException will be thrown on the first attempt to move the temp file. There is no point attempting the move operation a second time because it will only fail for the same reason. Add an immediate return of FAILURE on the first occasion. Remove the unnecessary handling of the exception in the second block. Change-Id: I4658a8b37cfec2d7ef0217c8346e512968d0964c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2020-04-181-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Remove double blank from sentence start Bump Bazel version to 3.0.0 Change-Id: I26c3a8345020239d1c2ec5c6f70a633b43ddab86
| * | | | | | Remove double blank from sentence startMichael Keppler2020-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple whitespaces are not normalized when reading properties files, therefore leading to unwanted space/indentation in console or UI output. Change-Id: I1f5224fe359e0cac493e0237872afc75dc8b9fbe Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> (cherry picked from commit ebbc3efce73278d6e0dbb1acd099db2446b1bed9)
* | | | | | | Scan through all merged reftables for max/min update indicesMinh Thai2020-04-051-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since reftables might have update index ranges that are overlapped. Change-Id: I8f8215b99a0a978d4dd0155dbaf33e5e06ea8202 Signed-off-by: Minh Thai <mthai@google.com> (cherry picked from commit 06748c205c44bb4eaf6015387112de97f566c6a2)
* | | | | | | Merge branch 'stable-5.6' into stable-5.7Thomas Wolf2020-04-034-6/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: FS.runInShell(): handle quoted filters and hooksPath containing blanks Handle non-normalized index also for executable files Change-Id: I240377e87c073ee7a621a88e39fc319c59fa037a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | FS.runInShell(): handle quoted filters and hooksPath containing blanksThomas Wolf2020-04-033-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 2323d7a. Using $0 in the shell command call results in the command string being taken literally. That was introduced to fix a problem with backslashes, but is actually not correct. First, the problem with backslashes occurred only on Win32/Cygwin, and has been properly fixed in commit 6f268f8. Second, this is used only for hooks (which don't have backslashes in their names) and filter commands from the git config, where the user is responsible for properly quoting or escaping such that the commands work. Third, using $0 actually breaks correctly quoted filter commands like in the bug report. The shell really takes the command literally, and then doesn't find the command because of quotes. So revert this change. At the same time there's a related problem with hooks. If the path to the hook contains blanks, runInShell() would also fail to find the hook. In this case, the command doesn't come from user input but is just a Java File object with an absolute path containing blanks. (Can occur if core.hooksPath points to such a path with blanks, or if the repository has such a path.) The path to the hook as obtained from the file system must be quoted. Add a test for a hook path with a blank. This reverts commit 2323d7a1ef909f9deb3f21329cf30bd1173ee9cf. Bug: 561666 Change-Id: I4d7df13e6c9b245fe1706e191e4316685a8a9d59 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | Handle non-normalized index also for executable filesThomas Wolf2020-03-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 60cf85a4 corrected the handling of check-in for files where the index version is non-normalized, i.e., contains CR-LF line endings. However, it did so only for regular files, not executable files. Bug: 561438 Change-Id: I372cc990c5efeb00315460f36459c0652d5d1e77 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Prepare 5.7.1-SNAPSHOT buildsMatthias Sohn2020-03-113-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I29cd1b9872603810f9c4d42424ac326fedf5569f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | JGit v5.7.0.202003110725-rv5.7.0.202003110725-rMatthias Sohn2020-03-113-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia4a9122eeb4eea0f379f6611984cfe1143a32f8d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>