From: Don Armstrong Date: Fri, 14 Apr 2017 16:37:10 +0000 (-0700) Subject: allow for branches which match names X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=a48ad575fc514c9d06149e5b7b2924a1f5b00314 allow for branches which match names --- 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