]> source.dussan.org Git - jgit.git/commit
reftable: tweaks for Windows 00/190200/4
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 31 Jan 2022 11:23:55 +0000 (12:23 +0100)
committerHan-Wen Nienhuys <hanwen@google.com>
Wed, 2 Feb 2022 13:12:15 +0000 (14:12 +0100)
commita650ae8ad3f459f02f5e362baef49316deed80bb
tree3027c61c27af3c62a4defdbfba00207fed6ba41a
parent424c861477fbc48db38578d6f572c8d0cc2ba710
reftable: tweaks for Windows

Reload the stack _before_ trying to delete the files. This ensures we
don't trip over our own open file handles when deleting compacted
tables.

If there is another process reading the file, it may be impossible to
delete the compacted tables. In this case, ignore the failure.

For cleaning the garbage in this case, the protocol as described in
https://www.git-scm.com/docs/reftable#_windows should be implemented.
This is left for another commit.

Bug: 578454
Change-Id: I7aa43508450041eb9376d9f67a0262ff7cc53c73
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableStackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java