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:
@ -9,6 +9,7 @@ usage () {
|
|||||||
die 'git commit [-m existing-commit] [<path>...]'
|
die 'git commit [-m existing-commit] [<path>...]'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
files=()
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -19,13 +20,16 @@ do
|
|||||||
exit ;;
|
exit ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
--all)
|
||||||
|
files=($(git-diff-files --name-only))\
|
||||||
|
;;
|
||||||
*) break
|
*) break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
git-update-cache -q --refresh -- "$@" || exit 1
|
git-update-cache -q --refresh -- "$@" "${files[@]}" || exit 1
|
||||||
PARENTS="-p HEAD"
|
PARENTS="-p HEAD"
|
||||||
if [ ! -r "$GIT_DIR/HEAD" ]; then
|
if [ ! -r "$GIT_DIR/HEAD" ]; then
|
||||||
if [ -z "$(git-ls-files)" ]; then
|
if [ -z "$(git-ls-files)" ]; then
|
||||||
|
Reference in New Issue
Block a user