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:
parent
7a36302cd7
commit
606611a070
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue