gmerge and pick-to-branch: further tweak output
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 8 Mar 2022 16:30:27 +0000 (17:30 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 26 Sep 2022 07:55:21 +0000 (09:55 +0200)
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/111)

review-tools/ghmerge
review-tools/pick-to-branch

index 1e96e6ac8a9e9ce45286f16acaba7dc98e8d8bdb..08808ca18e1bd33c236e184e319a1821d92aab76 100755 (executable)
@@ -223,10 +223,16 @@ else
     CHERRYPICKING=
 fi
 
-echo Diff against $REMOTE/$TARGET
+echo
+echo Log since $REMOTE/$TARGET:
+git log $REMOTE/$TARGET..
+
+echo
+echo Diff against $REMOTE/$TARGET:
 git diff $REMOTE/$TARGET
 
 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
@@ -235,16 +241,14 @@ if [ "$INTERACTIVE" == "yes" ] ; then
         while [ -e .git/rebase-merge ] ; do sleep 1 ; done
     fi
     REBASING=
+    echo
     echo "Calling addrev $ADDREVOPTS --prnum=$PRNUM $TEAM $REMOTE/$TARGET.."
     addrev $ADDREVOPTS --prnum=$PRNUM $TEAM $REMOTE/$TARGET..
 fi
 
-echo
-echo Log since $REMOTE/$TARGET
-git log $REMOTE/$TARGET..
-
 git checkout $TARGET
 if [ "$INTERACTIVE" != "yes" ] ; then
+    echo
     echo -n "Press Enter to non-interactively merge --squash $BRANCH to $REMOTE/$TARGET: "; read foo
     ORIG_TARGET_HEAD=`git show -s --format="%H"`
     git merge --ff-only --no-commit --squash $WORK
@@ -259,7 +263,8 @@ else
     git merge --ff-only $WORK
 fi
 
-echo New log since $REMOTE/$TARGET
+echo
+echo New log including addrev output since $REMOTE/$TARGET:
 git log $REMOTE/$TARGET..
 
 if [ "$BUILD" == "yes" ] ; then
@@ -267,6 +272,7 @@ if [ "$BUILD" == "yes" ] ; then
     CC="$CC" opensslbuild >/dev/null # any STDERR output will be shown
 fi
 
+echo
 while true ; do
     echo -n "Enter 'y'/'yes' to push to $REMOTE/$TARGET or 'n'/'no' to abort: "
     read x
index 1661e9373d512fb6a9f38e08df99ad7cb3fa54d4..caefefaf61cfcf58f3b1ee73c07998c917ad65da 100755 (executable)
@@ -72,8 +72,8 @@ esac
 echo "First commit to cherry-pick is: $id~$((num - 1))"
 echo "Target branch is: $target"
 echo "Number of commits to pick: $num"
-echo "Commit(s) to be cherry-picked:"
 echo
+echo "Commit(s) to be cherry-picked:"
 git log $id~$num..$id
 echo
 
@@ -115,6 +115,7 @@ CHERRYPICKING=1
 git cherry-pick -e -x $id~$num..$id || (echo 'Fix or Ctrl-d to abort' ; read || exit 1)
 CHERRYPICKING=
 
+echo
 while true ; do
     echo -n "Enter 'y'/'yes' to push or 'n'/'no' to abort: "
     read x