ghmerge: support stopping rebase for adaptations
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Fri, 26 Nov 2021 14:21:58 +0000 (15:21 +0100)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Fri, 26 Nov 2021 14:21:58 +0000 (15:21 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/102)

review-tools/ghmerge

index 1371bfba7dca4026f55529176db861aa9ba08db5..23b0ae2f14ffd2bb64ea2132b72034b7db6ea7a2 100755 (executable)
@@ -230,6 +230,10 @@ if [ "$INTERACTIVE" == "yes" ] ; then
     echo -n "Press Enter to interactively rebase $AUTOSQUASH on $REMOTE/$TARGET: "; read foo
     REBASING=1
     git rebase -i $AUTOSQUASH $REMOTE/$TARGET || exit 1
+    if [ -e .git/rebase-merge ] ; then  # likely, user tried 'b' or 'e' command to break or enter edit mode
+        echo -e "\nRebasing was stopped; please do your changes in parallel using another\n shell in the same directory, then give 'git rebase --continue' there"
+        while [ -e .git/rebase-merge ] ; do sleep 1 ; done
+    fi
     REBASING=
     echo "Calling addrev $ADDREVOPTS --prnum=$PRNUM $TEAM $REMOTE/$TARGET.."
     addrev $ADDREVOPTS --prnum=$PRNUM $TEAM $REMOTE/$TARGET..