filter-branch: Remove broken and unnecessary summary of rewritten refs.
[gitweb.git] / git-rebase--interactive.sh
index f83e00fe8fec63d5c58f375ec49ee8bf865f1344..cd7e43faeb7a946da51e47821b8e2adff7472a8f 100755 (executable)
@@ -322,7 +322,12 @@ do_next () {
                test -f "$DOTEST"/current-commit &&
                        current_commit=$(cat "$DOTEST"/current-commit) &&
                        git rev-parse HEAD > "$REWRITTEN"/$current_commit
-               NEWHEAD=$(cat "$REWRITTEN"/$OLDHEAD)
+               if test -f "$REWRITTEN"/$OLDHEAD
+               then
+                       NEWHEAD=$(cat "$REWRITTEN"/$OLDHEAD)
+               else
+                       NEWHEAD=$OLDHEAD
+               fi
        else
                NEWHEAD=$(git rev-parse HEAD)
        fi &&