summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-17 22:17:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-17 22:17:03 (GMT)
commit6a0049c07623a387bf7f7e7c90b71344c23decfa (patch)
tree9e7ea37f61dd57c5bf0a2d43a1cbb0d8b075d80d /git-commit-script
parentcfb0af1d50247e66ea1d46014650e60e9cfb87b9 (diff)
downloadgit-6a0049c07623a387bf7f7e7c90b71344c23decfa.zip
git-6a0049c07623a387bf7f7e7c90b71344c23decfa.tar.gz
git-6a0049c07623a387bf7f7e7c90b71344c23decfa.tar.bz2
Fix git-commit without paths.
The earlier one to grab output from diff-files --name-only has a grave bug that when no paths are given it ended up doing the equivalent of "git-commit --all", which was not what I intended. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-commit-script')
-rwxr-xr-xgit-commit-script6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-commit-script b/git-commit-script
index f6cd75f..15d0391 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -85,11 +85,13 @@ 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 --
;;
+,0)
+ ;;
*)
git-diff-files --name-only -z "$@" |
xargs -0 git-update-cache -q --