Description
If I do git gc --aggressive
(with the recent RC4 on Windows XP SP3 32-bit), at a certain stage git repack
tries to delete empty ".git/objects/NN" directories (after it supposedly moves the objects from them into a pack file), and fails.
The situation look slike this:
C:\devel\whatever>git gc --aggressive
Counting objects: 3163, done.
Compressing objects: 100% (3128/3128), done.
Writing objects: 100% (3163/3163), done.
Total 3163 (delta 2131), reused 1023 (delta 0)
Deletion of directory '.git/objects/01' failed. Should I try again? (y/n) y
Deletion of directory '.git/objects/01' failed. Should I try again? (y/n) y
Deletion of directory '.git/objects/01' failed. Should I try again? (y/n) y
Deletion of directory '.git/objects/01' failed. Should I try again? (y/n)
This happens for every other directory it tries to delete (if I answer "n" to the prompt).
The directories attempted to be deleted are truly empty -- I have verified that.
The details extracted using Process Explorer about the running git repack
process are:
- Executable's pathname:
C:\Program Files\Git\mingw32\libexec\git-core\git.exe
- Command-line:
git repack -d -l -f --depth=250 --window=250 -A --unpack-unreachable=2.weeks.ago
- Current directory: the repository's work tree.
If I use procexp
to search through the handles currently open for items under ".git", procexp
reveals that the handle to that repository is held by the same git repack
process which is trying to delete it (it also has the second handle open -- to the packfile it's supposedly were placing the objects into).