git-add--interactive: never skip files included in index
Make "git add -p" to not skip files that are in index even if they are excluded (by .gitignore etc.). This fixes the contradictory behavior that "git status" and "git commit -a" listed such files as modified, but "git add -p FILENAME" ignored them. Signed-off-by: Pauli Virtanen <pav@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ac78b00939
commit
b145b211ba
@ -186,7 +186,7 @@ sub list_modified {
|
||||
@tracked = map {
|
||||
chomp $_;
|
||||
unquote_path($_);
|
||||
} run_cmd_pipe(qw(git ls-files --exclude-standard --), @ARGV);
|
||||
} run_cmd_pipe(qw(git ls-files --), @ARGV);
|
||||
return if (!@tracked);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user