Open
Description
The function du_git_checkout
needs some investigation on how it works with Windows.
The way git checkouts work on Unix is that git2 creates a clone from the "db" to the "checkout". The clone uses hard-links into the .git
directory so that it doesn't use any additional disk space. However, I'm not sure how this works on Windows. Does it copy the files? Does it use junctions or other styles of links?
If Windows doesn't use some kind of link or COW, then the code in du_git_checkout
is not correct because it is not counting the .git
directory contents under the assumption that clones are links.
If this is a problem, then there are a few different options:
- Use a smarter
du
which knows about hard-links. - Use git worktrees instead of clones.
- Make the
!.git
pattern depend on the platform.