Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-generate: fix file tree walking to work with git worktrees
Currently git-generate snapshots the git directory before it makes changes so it can identify newly-created files. The file tree walking it performs explicitly ignores the .git directory, but sometimes the .git directory is actually a file, like when git worktrees are in use. In this case, the file tree walking code will actually return fs.SkipDir through the callback passed to filepath.WalkDir and will skip iterating over the rest of directories in the repository. Fix this by only returning fs.SkipDir only when .git is a directory.
- Loading branch information