summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-17 01:08:19 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-17 19:11:36 (GMT)
commit22cff6a5abef29ce74da3e57ba3488d77686fec8 (patch)
treeb52b47f3c07b7d4c648bfdff8aac84bd965cc275
parent86947d72d422aeaaeb4c1f41b49fc7a606c96321 (diff)
downloadgit-22cff6a5abef29ce74da3e57ba3488d77686fec8.zip
git-22cff6a5abef29ce74da3e57ba3488d77686fec8.tar.gz
git-22cff6a5abef29ce74da3e57ba3488d77686fec8.tar.bz2
git-commit: pass explicit path to git-diff-files.
When running "git commit" with explicit path arguments, allow it to take directory name. This makes "git commit Documentation/" to commit everything that is changed under Documentation/ directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-commit-script11
1 files changed, 8 insertions, 3 deletions
diff --git a/git-commit-script b/git-commit-script
index 790f07c..f6cd75f 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -88,9 +88,14 @@ esac
case "$all" in
t)
git-diff-files --name-only -z |
- xargs -0 git-update-cache -q -- || exit 1 ;;
-esac
-git-update-cache -q --refresh -- "$@" || exit 1
+ xargs -0 git-update-cache -q --
+ ;;
+*)
+ git-diff-files --name-only -z "$@" |
+ xargs -0 git-update-cache -q --
+ ;;
+esac || exit 1
+git-update-cache -q --refresh || exit 1
case "$verify" in
t)