Don't do --no-ff merges for feature branches that exist of a single commit (no benefits are gained in those situations, only complexity is added).
This commit is contained in:
parent
788227b4ff
commit
938b0736f3
1 changed files with 8 additions and 1 deletions
|
@ -77,7 +77,14 @@ finish() {
|
|||
|
||||
# All checks passed, ready to roll
|
||||
git checkout develop
|
||||
git merge --no-ff "$FEATURE"
|
||||
|
||||
# In case there has been only a single commit in the feature branch, don't
|
||||
# use --no-ff, since it has no extra advantages
|
||||
FF_FLAG="--no-ff"
|
||||
if [ "$(git rev-list develop.."$FEATURE" | wc -l)" -eq 1 ]; then
|
||||
FF_FLAG="--ff"
|
||||
fi
|
||||
git merge "$FF_FLAG" "$FEATURE"
|
||||
# TODO: How do we handle merge conflicts here??
|
||||
git branch -d "$FEATURE"
|
||||
|
||||
|
|
Loading…
Reference in a new issue