Version
6.10.1.202505221210-r
Operating System
Windows
Bug description
Create Git object based on a bare repo.
Set it to mirror a remote repo
Execute Pull
Close the repository will all available methods:
- FileRepository close (we observe useCnt = 0)
- RepositoryCache.clear()
- Git.close()
- WindowCacheConfig wconfig = new WindowCacheConfig();
wconfig.setPackedGitMMAP(false);
WindowCache.reconfigure(wconfig);
Step 4 is based on other bug reports about this behavior
- Thread.sleep(4000) - in case other threads need to finish some work
- Delete the git folder on disk via recursive methods
Actual behavior
Error removing file \GitRepository\AT19021222.git\objects\pack\pack-0ae6de42f7a464520ac14706e3e385c0ca62c94d.idx; Error: java.nio.file.AccessDeniedException
Error removing file \GitRepository\AT19021222.git\objects\pack\pack-0ae6de42f7a464520ac14706e3e385c0ca62c94d.pack; Error: java.nio.file.AccessDeniedException
These are all the open files that can't be removed. All other Git files can safely be deleted.
Expected behavior
I would expect that these files can be deleted.
Relevant log output
Pasted as image in the other information. I am using source code and littered the code with some debug statements.
Note that WindowCache is never using mmap.
The exception for deleting the file from Java is observed at 14:33:55.916
Using the Process Monitor, I observe that as soon as the failure happens, the file is closed. Removing the file from Windows Explorer then works.
Other information

Version
6.10.1.202505221210-r
Operating System
Windows
Bug description
Create Git object based on a bare repo.
Set it to mirror a remote repo
Execute Pull
Close the repository will all available methods:
wconfig.setPackedGitMMAP(false);
WindowCache.reconfigure(wconfig);
Step 4 is based on other bug reports about this behavior
Actual behavior
Error removing file \GitRepository\AT19021222.git\objects\pack\pack-0ae6de42f7a464520ac14706e3e385c0ca62c94d.idx; Error: java.nio.file.AccessDeniedException
Error removing file \GitRepository\AT19021222.git\objects\pack\pack-0ae6de42f7a464520ac14706e3e385c0ca62c94d.pack; Error: java.nio.file.AccessDeniedException
These are all the open files that can't be removed. All other Git files can safely be deleted.
Expected behavior
I would expect that these files can be deleted.
Relevant log output
Other information