summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2005-07-19 11:20:39 (GMT)
committerLinus Torvalds <torvalds@evo.osdl.org>2005-07-19 11:20:39 (GMT)
commitf0b32737ad5a35cc047db47353a75faccfe5939e (patch)
tree719f329cde82a86b7f37ea83eae5ed6f9fd5d5f6 /git-commit-script
parent2a9c3fe838a21cb2097347e15bec71e848f8d625 (diff)
downloadgit-f0b32737ad5a35cc047db47353a75faccfe5939e.zip
git-f0b32737ad5a35cc047db47353a75faccfe5939e.tar.gz
git-f0b32737ad5a35cc047db47353a75faccfe5939e.tar.bz2
Add "git commit --all" since everybody seems to want it.
This replaces git-diff-files --name-only | xargs git-update-cache git commit with a new "--all" argument to "git commit".
Diffstat (limited to 'git-commit-script')
-rwxr-xr-xgit-commit-script6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-commit-script b/git-commit-script
index c6f8ee2..04d16ae 100755
--- a/git-commit-script
+++ b/git-commit-script
@@ -9,6 +9,7 @@ usage () {
die 'git commit [-m existing-commit] [<path>...]'
}
+files=()
while case "$#" in 0) break ;; esac
do
case "$1" in
@@ -19,13 +20,16 @@ do
exit ;;
esac
;;
+ --all)
+ files=($(git-diff-files --name-only))\
+ ;;
*) break
;;
esac
shift
done
-git-update-cache -q --refresh -- "$@" || exit 1
+git-update-cache -q --refresh -- "$@" "${files[@]}" || exit 1
PARENTS="-p HEAD"
if [ ! -r "$GIT_DIR/HEAD" ]; then
if [ -z "$(git-ls-files)" ]; then