Commit 938b0736 authored by Vincent Driessen's avatar Vincent Driessen

Don't do --no-ff merges for feature branches that exist of a single commit (no...

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).
parent 788227b4
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment