[PATCH] Allow file removal when "git commit --all" is used.
[gitweb.git] / git-commit-script
index f6cd75f024a0ddb247807086c04eff6d6f8fe6cd..de298b7b26ab212d62e62bc0f8b4fbf43a5b6774 100755 (executable)
@@ -85,14 +85,16 @@ tt*)
   die "Only one of -c/-C/-F/-m can be used." ;;
 esac
 
-case "$all" in
-t)
+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