You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FileReftableStack.reloadOnce all files which are listed in tables.list are open by FileInputStream. This causes unlink errors in other processes under windows(e.g. git-bash).
Actual behavior
Start a java process which uses jgit to open a Repository and hold the process before git.close(). For example with debugger, or by waiting for input.
In the same time, go to git bash and create a new ref.
Unlink of file 'C:/temp/jgit/.git/reftable/0x000000000001-0x000000000007-43471c5d.ref' failed. Should I try again? (y/n)
Expected behavior
The files of the reftable should not be locked until git.close(). It should only be locked by FileInputStream, if reads of reftable in jgit is neccessary.
If the read of an ref-files failed (because it was deleted), jgit should reread the tables.list file.
Relevant log output
No response
Other information
Sorry for my poor english. I hope, you understand my problem ;)
The text was updated successfully, but these errors were encountered:
zotttelbart
changed the title
reftable-files locked and can't unlink by cgit
reftable-files locked and can't unlink by cgit (on windows)
Oct 20, 2024
Version
7.0.0
Operating System
Windows
Bug description
In FileReftableStack.reloadOnce all files which are listed in tables.list are open by FileInputStream. This causes unlink errors in other processes under windows(e.g. git-bash).
Actual behavior
Start a java process which uses jgit to open a Repository and hold the process before git.close(). For example with debugger, or by waiting for input.
In the same time, go to git bash and create a new ref.
example:
git update-ref refs/tags/test 939d321faccd12bff4cb13ce6358820297fbc78e
then pack the reftable by
git pack-refs
you should get something like:
Unlink of file 'C:/temp/jgit/.git/reftable/0x000000000001-0x000000000007-43471c5d.ref' failed. Should I try again? (y/n)
Expected behavior
The files of the reftable should not be locked until git.close(). It should only be locked by FileInputStream, if reads of reftable in jgit is neccessary.
If the read of an ref-files failed (because it was deleted), jgit should reread the tables.list file.
Relevant log output
No response
Other information
Sorry for my poor english. I hope, you understand my problem ;)
The text was updated successfully, but these errors were encountered: