From: David Goldstein Date: Thu, 18 Sep 2025 17:28:05 GMT Subject: [bug] git check-ignore returns the wrong exit code with -v when only a negative pattern matches Message-ID: Hey folks, I think I found a git check-ignore bug. According to the docs, git check-ignore should only exit 0 if a file is ignored, but if an untracked file matches a negative pattern in .gitignore (or the file can be tracked if --no-index is also used), then git check-ignore -v exits 0 when it should exit 1; without -v the exit code is correct (0). https://github.com/dgoldstein0/git_bug_repro has a self-contained reproduction + repeated explanation. This exists in all git versions I've tested, but I haven't tried to get the latest dev version to check if it's still a problem in the latest version.