diff options
author | Junio C Hamano <junkio@cox.net> | 2005-08-18 00:59:37 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-19 16:19:16 -0700 |
commit | e20ce6ac762589868e46603ee1223f2f852c4403 (patch) | |
tree | b64c164785bdfb3d3d0ba6e8e0ff91cf85654de0 /git-commit-script | |
parent | b30245c8e92ecaf8fb877189d7620a5a9a205120 (diff) | |
download | git-e20ce6ac762589868e46603ee1223f2f852c4403.tar.gz git-e20ce6ac762589868e46603ee1223f2f852c4403.tar.xz |
[PATCH] Allow file removal when "git commit --all" is used.
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>
Diffstat (limited to 'git-commit-script')
-rwxr-xr-x | git-commit-script | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-commit-script b/git-commit-script index 15d03913d..de298b7b2 100755 --- a/git-commit-script +++ b/git-commit-script @@ -88,13 +88,13 @@ esac 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 |