t4118: be nice to non-GNU sed
[gitweb.git] / git-commit.sh
index 476f4f18dbb76041fbbfe6243785ad4997a7e7c7..fdaedc0e2e6bcfd33816e3c165fbd5ae48e27eee 100755 (executable)
@@ -360,7 +360,7 @@ t,)
                if test -z "$initial_commit"
                then
                        cp "$THIS_INDEX" "$TMP_INDEX"
-                       GIT_INDEX_FILE="$TMP_INDEX" git-read-tree -m HEAD
+                       GIT_INDEX_FILE="$TMP_INDEX" git-read-tree -i -m HEAD
                else
                        rm -f "$TMP_INDEX"
                fi || exit
@@ -621,6 +621,9 @@ else
 fi
 ret="$?"
 rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
+
+cd_to_toplevel
+
 if test -d "$GIT_DIR/rr-cache"
 then
        git-rerere