From 8231fa6ae1ef92be73bec5cf0a533a4d8b71d536 Mon Sep 17 00:00:00 2001 From: Dave Williams Date: Thu, 5 Sep 2013 17:08:01 +0100 Subject: check-ignore: Add option to ignore index contents check-ignore currently shows how .gitignore rules would treat untracked paths. Tracked paths do not generate useful output. This prevents debugging of why a path became tracked unexpectedly unless that path is first removed from the index with `git rm --cached `. The option --no-index tells the command to bypass the check for the path being in the index and hence allows tracked paths to be checked too. Whilst this behaviour deviates from the characteristics of `git add` and `git status` its use case is unlikely to cause any user confusion. Test scripts are augmented to check this option against the standard ignores to ensure correct behaviour. Signed-off-by: Dave Williams Signed-off-by: Junio C Hamano --- Documentation/git-check-ignore.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check-ignore.txt index d2df487aa2..ee2e091704 100644 --- a/Documentation/git-check-ignore.txt +++ b/Documentation/git-check-ignore.txt @@ -45,6 +45,13 @@ OPTIONS not be possible to distinguish between paths which match a pattern and those which don't. +--no-index:: + Don't look in the index when undertaking the checks. This can + be used to debug why a path became tracked by e.g. `git add .` + and was not ignored by the rules as expected by the user or when + developing patterns including negation to match a path previously + added with `git add -f`. + OUTPUT ------ -- cgit v1.2.3