From 9bddd21d326e810cfdf2787f9d5d8a2bc263ad7f Mon Sep 17 00:00:00 2001 From: comp500 Date: Sat, 25 Mar 2023 13:37:25 +0000 Subject: [PATCH] Prevent the pack root directory from being packwizignored --- core/index.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/index.go b/core/index.go index 4c9978e..b77f124 100644 --- a/core/index.go +++ b/core/index.go @@ -234,6 +234,11 @@ func (in *Index) Refresh() error { return err } + // Never ignore pack root itself (gitignore doesn't allow ignoring the root) + if path == packRoot { + return nil + } + if info.IsDir() { // Don't traverse ignored directories (consistent with Git handling of ignored dirs) if ignore.MatchesPath(path) {