Fix rebase-bump-commit script

Trim whitespace from wc's output before constructing arguments to `git rebase`

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-01-26 17:41:26 +00:00
parent bbaae11a0f
commit d3cd9213c1
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ if [[ "$sha" == "$(git rev-parse HEAD)" ]]; then
exit 0
fi
commits=$(git log --format="%H" "$sha..HEAD" | wc -l)
commits=$(git log --format="%H" "$sha..HEAD" | wc -l | xargs echo)
git rebase --onto $sha~1 HEAD~$commits $BRANCH
git cherry-pick $sha