]> git.donarmstrong.com Git - bin.git/commitdiff
allow for branches which match names
authorDon Armstrong <don@donarmstrong.com>
Fri, 14 Apr 2017 16:37:10 +0000 (09:37 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 14 Apr 2017 16:37:10 +0000 (09:37 -0700)
git-merge-ff

index 46a394c4713c9b2d05649ed9ca188ddc21ae2582..40bcaa19071dcff695404c6b87009725353cb140 100755 (executable)
@@ -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