Skip to content

Commit 6790371

Browse files
authored
fix merge diff display (#7047)
1 parent 20306d6 commit 6790371

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/git/git-fwd-merge

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if [ -z ${branch} ]; then
2828
exit 1
2929
fi
3030

31+
# save old commit
32+
oldhead=$(git show | grep commit | cut -d ' ' -f 2)
33+
3134
# Construct merge message
3235
currentBranch=$(git branch | grep "^*" | sed -e "s/^[*] //")
3336
echo "Merge release branch ${branch} to ${currentBranch}" > ${tmpMessageFile}
@@ -53,9 +56,9 @@ fi
5356
rm -fr ${tmpMessageFile}
5457

5558
apache_remote=$(git remote -v | grep -E "git-wip-us\.apache\.org" | head -n 1 | cut -f1)
56-
echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch})"
59+
echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${oldhead}..${currentBranch})"
5760
echo
58-
git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch}
61+
git log --pretty=oneline --abbrev-commit ${oldhead}..${currentBranch}
5962

6063
# What's next
6164
echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure."

0 commit comments

Comments
 (0)