From 52edbbb6cc2e2c58e360b737143c10adddc43880 Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Sat, 12 Dec 2015 11:00:41 +0100 Subject: [PATCH] Show actual diff in commits after merge --- tools/git/git-fwd-merge | 5 +++++ tools/git/git-pr | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tools/git/git-fwd-merge b/tools/git/git-fwd-merge index d0ce46a681a..44cbf0a69a0 100755 --- a/tools/git/git-fwd-merge +++ b/tools/git/git-fwd-merge @@ -52,5 +52,10 @@ fi # Clean up 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 +git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch} + # What's next echo "We're done! Please double check using 'git log -p' and 'git push' when you're sure." diff --git a/tools/git/git-pr b/tools/git/git-pr index 2bd58f689eb..696e0ad1d23 100755 --- a/tools/git/git-pr +++ b/tools/git/git-pr @@ -179,6 +179,7 @@ elif [ "${prMergeableState}" != "clean" ] && [ ${force} -eq 1 ]; then fi github_remote=$(git remote -v | grep -E "apache/${repoName}(.git)?" | head -n 1 | cut -f1) +apache_remote=$(git remote -v | grep -E "git-wip-us\.apache\.org" | head -n 1 | cut -f1) if [ ${#github_remote} -eq 0 ]; then echo "ERROR: We couldn't find a git remote pointing to 'apache/${repoName}.git' to merge the PR from." echo "INFO: Currently, your configured remotes are:" @@ -230,6 +231,8 @@ fi echo "INFO: ***********************************************************************************" echo "INFO: Merged successfully! Please double check using 'git log -p' and 'git push' when you're sure." echo "INFO: About commits: there should be ${prCommits} from the PR plus 1 merge commit." +echo "INFO: Actual diff in commits is: (running git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch})" echo +git log --pretty=oneline --abbrev-commit ${apache_remote}/${currentBranch}..${currentBranch} clean_up_and_exit 0