Browse Source

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>
maint
Junio C Hamano 19 years ago
parent
commit
f678dd180a
  1. 5
      git-commit.sh

5
git-commit.sh

@ -92,10 +92,13 @@ tt*) @@ -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)
;;
*)

Loading…
Cancel
Save