From: Linus Torvalds Date: Tue, 19 Jul 2005 11:20:39 +0000 (-0400) Subject: Add "git commit --all" since everybody seems to want it. X-Git-Tag: v0.99.2~44 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f0b32737ad5a35cc047db47353a75faccfe5939e;p=git.git 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". --- diff --git a/git-commit-script b/git-commit-script index c6f8ee2b..04d16ae9 100755 --- a/git-commit-script +++ b/git-commit-script @@ -9,6 +9,7 @@ usage () { die 'git commit [-m existing-commit] [...]' } +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