Code

t2200: test more cases of "add -u"
[git.git] / git-commit.sh
index 5ea3fd00768dbb5e27ee1b8b9f3285ee35640021..ab43217be4b49ce71ffee461569e0e4b395dfb5d 100755 (executable)
@@ -25,6 +25,7 @@ refuse_partial () {
        exit 1
 }
 
+TMP_INDEX=
 THIS_INDEX="$GIT_DIR/index"
 NEXT_INDEX="$GIT_DIR/next-index$$"
 rm -f "$NEXT_INDEX"
@@ -89,7 +90,7 @@ force_author=
 only_include_assumed=
 untracked_files=
 templatefile="`git config commit.template`"
-while case "$#" in 0) break;; esac
+while test $# != 0
 do
        case "$1" in
        -F|--F|-f|--f|--fi|--fil|--file)
@@ -404,7 +405,7 @@ t,)
                (
                        GIT_INDEX_FILE="$NEXT_INDEX"
                        export GIT_INDEX_FILE
-                       git update-index --remove --stdin
+                       git update-index --add --remove --stdin
                ) || exit
                ;;
        esac