From a48ad575fc514c9d06149e5b7b2924a1f5b00314 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 14 Apr 2017 09:37:10 -0700 Subject: [PATCH] allow for branches which match names --- git-merge-ff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-merge-ff b/git-merge-ff index 46a394c..40bcaa1 100755 --- a/git-merge-ff +++ b/git-merge-ff @@ -24,7 +24,7 @@ _merge_ff() { fi if [ "$(git symbolic-ref HEAD)" = "refs/heads/$branch" ]; then - git merge $quiet --ff-only "$commit" + git merge $quiet --ff-only "$commit" -- else if [ "$(git merge-base $branch_orig_hash $commit_orig_hash)" != "$branch_orig_hash" ]; then echo "Error: merging $commit into $branch would not be a fast-forward" 1>&2 @@ -34,7 +34,7 @@ _merge_ff() { if git update-ref -m "merge $commit: Fast forward" "refs/heads/$branch" "$commit_orig_hash" "$branch_orig_hash"; then if [ -z $quiet ]; then echo "Fast forward" - git diff --stat "$branch@{1}" "$branch" + git diff --stat "$branch@{1}" "$branch" -- fi else echo "Error: fast forward using update-ref failed" 1>&2 @@ -53,4 +53,4 @@ shift $((OPTIND-1)) case $# in 2 ) _merge_ff "$1" "$2";; * ) _usage -esac \ No newline at end of file +esac -- 2.39.2