From 606611a0705677099cb238d17bb441aa75a93d8b Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 4 Jun 2017 17:05:37 +0200 Subject: [PATCH] git-step-rebase: count distance to branch head correctly. Without --first-parent, 'git rev-list' counts commits on merged branches, too. Not noticed on Teacup, because we have no merges here, but in another repo this came up. --- tools/git-step-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/git-step-rebase b/tools/git-step-rebase index d19414e..33eff41 100755 --- a/tools/git-step-rebase +++ b/tools/git-step-rebase @@ -41,7 +41,7 @@ COMMON_PARENT=$(git merge-base HEAD ${BASE_BRANCH}) echo echo "Common parent is ${COMMON_PARENT}." -PARENTS=$(git rev-list ${COMMON_PARENT}..${BASE_BRANCH} | wc -l) +PARENTS=$(git rev-list --first-parent ${COMMON_PARENT}..${BASE_BRANCH} | wc -l) echo "${PARENTS} commits to go." let PARENTS=${PARENTS}-1