From bc2d91825af72f6511ce45c8f1ce4556141d4333 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Jun 2017 12:24:01 +0000 Subject: add trailing '--' to git-diff(1) call in git-merge-ff --- bin/git-merge-ff | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/git-merge-ff') diff --git a/bin/git-merge-ff b/bin/git-merge-ff index 789d7cbf..3d58a662 100755 --- a/bin/git-merge-ff +++ b/bin/git-merge-ff @@ -8,6 +8,10 @@ # modified by spwhitton not to output a diff when the fast-forward # didn't change anything +# modified by spwhitton to add trailing '--' to call to git-diff(1), +# which avoids an error when there is a filename and branch with the +# same name + _usage() { echo "Usage: git merge-ff []" 1>&2 exit 1 @@ -46,7 +50,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 -- cgit v1.2.3