diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-06-30 12:24:01 +0000 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-06-30 12:24:01 +0000 |
commit | bc2d91825af72f6511ce45c8f1ce4556141d4333 (patch) | |
tree | ca80dc4255f9adae1846da2ab0deebd49a5f8535 /bin/git-merge-ff | |
parent | e679c7075dc92c77aa7b7d0407b6b483e8c967c4 (diff) | |
download | dotfiles-bc2d91825af72f6511ce45c8f1ce4556141d4333.tar.gz |
add trailing '--' to git-diff(1) call in git-merge-ff
Diffstat (limited to 'bin/git-merge-ff')
-rwxr-xr-x | bin/git-merge-ff | 6 |
1 files changed, 5 insertions, 1 deletions
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 <branch> [<committish-to-merge>]" 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 |