From: Junio C Hamano Date: Fri, 25 Nov 2005 21:33:14 +0000 (-0800) Subject: Prevent "git-commit -a path1 path2..." X-Git-Tag: v0.99.9k^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f678dd180a037283decb76201b537dca24de848f;p=git.git 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 --- diff --git a/git-commit.sh b/git-commit.sh index 41955e8e6..27aea80a4 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) ;; *)