From: Junio C Hamano Date: Wed, 17 Aug 2005 22:17:03 +0000 (-0700) Subject: Fix git-commit without paths. X-Git-Tag: v0.99.5~15^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a0049c07623a387bf7f7e7c90b71344c23decfa;p=git.git 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 --- diff --git a/git-commit-script b/git-commit-script index f6cd75f02..15d03913d 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 --