author | Junio C Hamano <junkio@cox.net> | |
Tue, 14 Feb 2006 20:40:20 +0000 (12:40 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 14 Feb 2006 22:48:22 +0000 (14:48 -0800) | ||
commit | bba319b5cecacaccef85ce3c4cf9e3593532e328 | |
tree | e9b0fd57d6793b381b3208084212c282545fa682 | tree | snapshot |
parent | 9ece7169a434d69a942b71dc49f507da37bbdbc3 | commit | diff |
commit: detect misspelled pathspec while making a partial commit.
When you say "git commit Documentaiton" to make partial commit
for the files only in that directory, we did not detect that as
a misspelled pathname and attempted to commit index without
change. If nothing matched, there is no harm done, but if the
index gets modified otherwise by having another valid pathspec
or after an explicit update-index, a user will not notice
without paying attention to the "git status" preview.
This introduces --error-unmatch option to ls-files, and uses it
to detect this common user error.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When you say "git commit Documentaiton" to make partial commit
for the files only in that directory, we did not detect that as
a misspelled pathname and attempted to commit index without
change. If nothing matched, there is no harm done, but if the
index gets modified otherwise by having another valid pathspec
or after an explicit update-index, a user will not notice
without paying attention to the "git status" preview.
This introduces --error-unmatch option to ls-files, and uses it
to detect this common user error.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit.sh | diff | blob | history | |
ls-files.c | diff | blob | history |