mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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".
This commit is contained in:
parent
2a9c3fe838
commit
f0b32737ad
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue