summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b30245c)
raw | patch | inline | side by side (parent: b30245c)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 18 Aug 2005 07:59:37 +0000 (00:59 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 19 Aug 2005 23:19:16 +0000 (16:19 -0700) |
After you deleted files from your working tree, automatic
git-update-cache used when the "--all" flag is given to "git
commit" barfs because it lacks the --remove flag.
It can be argued that this is a feature; people should be
careful and something with a grave consequence like removing
files should be done manually, in which case the current
behaviour may be OK.
The patch is for people who thinks the user who uses the "--all"
flag deserves the danger that comes with the convenience.
Comments?
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-update-cache used when the "--all" flag is given to "git
commit" barfs because it lacks the --remove flag.
It can be argued that this is a feature; people should be
careful and something with a grave consequence like removing
files should be done manually, in which case the current
behaviour may be OK.
The patch is for people who thinks the user who uses the "--all"
flag deserves the danger that comes with the convenience.
Comments?
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-commit-script | patch | blob | history |
diff --git a/git-commit-script b/git-commit-script
index 15d03913d5eca6c7eb0eeb146e3e6cf6ba7d1d56..de298b7b26ab212d62e62bc0f8b4fbf43a5b6774 100755 (executable)
--- a/git-commit-script
+++ b/git-commit-script
case "$all,$#" in
t,*)
git-diff-files --name-only -z |
- xargs -0 git-update-cache -q --
+ xargs -0 git-update-cache -q --remove --
;;
,0)
;;
*)
git-diff-files --name-only -z "$@" |
- xargs -0 git-update-cache -q --
+ xargs -0 git-update-cache -q --remove --
;;
esac || exit 1
git-update-cache -q --refresh || exit 1