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.
This commit is contained in:
Markus Hitter 2017-06-04 17:05:37 +02:00
parent 7a36302cd7
commit 606611a070
1 changed files with 1 additions and 1 deletions

View File

@ -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