diff options
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-x | git-rebase--interactive.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 495f554b65..848fbe7d59 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -194,6 +194,15 @@ pick_one_preserving_merges () { if test -f "$REWRITTEN"/$p then new_p=$(cat "$REWRITTEN"/$p) + + # If the todo reordered commits, and our parent is marked for + # rewriting, but hasn't been gotten to yet, assume the user meant to + # drop it on top of the current HEAD + if test -z "$new_p" + then + new_p=$(git rev-parse HEAD) + fi + test $p != $new_p && fast_forward=f case "$new_parents" in *$new_p*) |