_GIT_INDEX_OUTPUT: allow plumbing to output to an alternative index file.
[gitweb.git] / git-commit.sh
index 3656d607d5b91d8d125b5a72b6a2a00aee512618..20c0dc806f8cb42b4094ab7ad56b8eb582c1827f 100755 (executable)
@@ -370,8 +370,8 @@ t,)
                # the same way.
                if test -z "$initial_commit"
                then
-                       cp "$THIS_INDEX" "$TMP_INDEX"
-                       GIT_INDEX_FILE="$TMP_INDEX" git-read-tree -m HEAD
+                       _GIT_INDEX_OUTPUT="$TMP_INDEX" \
+                       GIT_INDEX_FILE="$THIS_INDEX" git-read-tree -i -m HEAD
                else
                        rm -f "$TMP_INDEX"
                fi || exit