ghmerge: support handling conflicts on interactive rebase
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 24 Nov 2022 21:28:28 +0000 (22:28 +0100)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 24 Nov 2022 21:28:28 +0000 (22:28 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/132)

review-tools/ghmerge

index 67e5f6e7b2e93ada90c29a9892ba6585c901df57..7a8fae15470c80972d68359365d7f32bc8d06580 100755 (executable)
@@ -235,7 +235,7 @@ if [ "$INTERACTIVE" == "yes" ] ; then
     echo
     echo -n "Press Enter to interactively rebase $AUTOSQUASH on $REMOTE/$TARGET: "; read foo
     REBASING=1
-    git rebase -i $AUTOSQUASH $REMOTE/$TARGET || exit 1
+    git rebase -i $AUTOSQUASH $REMOTE/$TARGET || (echo -ne "Press Ctrl-d to abort, or fix the issue in another shell,\n    run 'git rebase --continue' there, and on success press Enter here: "; read || 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