]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-commit.sh
autoconf: Add tests for memmem, strtoumax and mkdtemp functions
[thirdparty/git.git] / git-commit.sh
index cb14f0621651d2006b08d1eddf67ab3269df84d0..485339754ca3567c86b824af656700654c68e173 100755 (executable)
@@ -5,6 +5,7 @@
 
 USAGE='[-a | --interactive] [-s] [-v] [--no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit> | --amend] [-u] [-e] [--author <author>] [--template <file>] [[-i | -o] <path>...]'
 SUBDIRECTORY_OK=Yes
+OPTIONS_SPEC=
 . git-sh-setup
 require_work_tree
 
@@ -25,7 +26,8 @@ refuse_partial () {
        exit 1
 }
 
-THIS_INDEX="$GIT_DIR/index"
+TMP_INDEX=
+THIS_INDEX="${GIT_INDEX_FILE:-$GIT_DIR/index}"
 NEXT_INDEX="$GIT_DIR/next-index$$"
 rm -f "$NEXT_INDEX"
 save_index () {
@@ -281,9 +283,9 @@ unset only
 case "$all,$interactive,$also,$#" in
 *t,*t,*)
        die "Cannot use -a, --interactive or -i at the same time." ;;
-t,,[1-9]*)
+t,,,[1-9]*)
        die "Paths with -a does not make sense." ;;
-,t,[1-9]*)
+,t,,[1-9]*)
        die "Paths with --interactive does not make sense." ;;
 ,,t,0)
        die "No paths with -i does not make sense." ;;
@@ -611,6 +613,7 @@ git rerere
 
 if test "$ret" = 0
 then
+       git gc --auto
        if test -x "$GIT_DIR"/hooks/post-commit
        then
                "$GIT_DIR"/hooks/post-commit