You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2023/01/09 10:43:39 UTC

[cloudstack] branch main updated: fix merge diff display (#7047)

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 6790371fe2 fix merge diff display (#7047)
6790371fe2 is described below

commit 6790371fe2dafd0d0e0652caa4a4194cbdcaa8d7
Author: dahn <da...@onecht.net>
AuthorDate: Mon Jan 9 02:43:32 2023 -0800

    fix merge diff display (#7047)
---
 tools/git/git-fwd-merge | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/git/git-fwd-merge b/tools/git/git-fwd-merge
index 44cbf0a69a..f441ce60ba 100755
--- a/tools/git/git-fwd-merge
+++ b/tools/git/git-fwd-merge
@@ -28,6 +28,9 @@ if [ -z ${branch} ]; then
   exit 1
 fi
 
+# save old commit
+oldhead=$(git show | grep commit |  cut -d ' ' -f 2)
+
 # Construct merge message
 currentBranch=$(git branch | grep "^*" | sed -e "s/^[*] //")
 echo "Merge release branch ${branch} to ${currentBranch}" > ${tmpMessageFile}
@@ -53,9 +56,9 @@ fi
 rm -fr ${tmpMessageFile}
 
 apache_remote=$(git remote -v | grep -E "git-wip-us\.apache\.org" | head -n 1 | cut -f1)
-echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch})"
+echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${oldhead}..${currentBranch})"
 echo
-git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch}
+git log --pretty=oneline --abbrev-commit ${oldhead}..${currentBranch}
 
 # What's next
 echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure."