Prevent the pack root directory from being packwizignored

This commit is contained in:
comp500 2023-03-25 13:37:25 +00:00
parent 9fc9ee5e09
commit 9bddd21d32

View File

@ -234,6 +234,11 @@ func (in *Index) Refresh() error {
return err return err
} }
// Never ignore pack root itself (gitignore doesn't allow ignoring the root)
if path == packRoot {
return nil
}
if info.IsDir() { if info.IsDir() {
// Don't traverse ignored directories (consistent with Git handling of ignored dirs) // Don't traverse ignored directories (consistent with Git handling of ignored dirs)
if ignore.MatchesPath(path) { if ignore.MatchesPath(path) {