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).
diff --git a/gitflow-feature b/gitflow-feature
index 32b1bcc..90c9f4c 100755
--- a/gitflow-feature
+++ b/gitflow-feature
@@ -77,7 +77,14 @@
# 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"