rebase -p -i: handle "no changes" gracefully
Since commit 376ccb8cbb
(rebase -i: style
fixes and minor cleanups), unchanged SHA-1s are no longer mapped via
$REWRITTEN. But the updating phase was not prepared for the old head
not being rewritten.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
77680caadb
commit
34454e858d
@ -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 &&
|
||||
|
Reference in New Issue
Block a user