summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-25 21:33:14 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-25 21:33:14 (GMT)
commitf678dd180a037283decb76201b537dca24de848f (patch)
tree5f1f1dcb7b80fc18f4e0c691b180482b0da04a70 /git-commit.sh
parent3a2f2bb354d920e3f1b7f4334d3656c77e9fb423 (diff)
downloadgit-f678dd180a037283decb76201b537dca24de848f.zip
git-f678dd180a037283decb76201b537dca24de848f.tar.gz
git-f678dd180a037283decb76201b537dca24de848f.tar.bz2
Prevent "git-commit -a path1 path2..."
When you want to create a partial commit, giving -a by mistake would ignore the given path. Prevent it. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 41955e8..27aea80 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -92,10 +92,13 @@ tt*)
esac
case "$all,$#" in
-t,*)
+t,0)
git-diff-files --name-only -z |
git-update-index --remove -z --stdin
;;
+t,*)
+ die "Cannot use -a and explicit files at the same time."
+ ;;
,0)
;;
*)