# [PATCH] git-mergetool: properly handle "git mergetool -- filename"

2 messages from 2008-12-20 to 2008-12-20. Participants: David Aguilar, Junio C Hamano.
Thread: https://gitlist.dev/t/16803

## David Aguilar, 2008-12-20 01:01

Subject: [PATCH] git-mergetool: properly handle "git mergetool -- filename"
Message-ID: <593cce2ad8b4d21995b24f0186e846d98306ae60.1229734788.git.davvid@gmail.com>
URL: https://gitlist.dev/e/593cce2ad8b4d21995b24f0186e846d98306ae60.1229734788.git.davvid%40gmail.com

```
Like many git commands, git-mergetool allows "--" to signal
the end of option processing.  This adds a missing "shift"
statement so that this is correctly handled.

Signed-off-by: David Aguilar <davvid@gmail.com>
---
 git-mergetool.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 94187c3..d4078a6 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -296,6 +296,7 @@ do
 	    esac
 	    ;;
 	--)
+	    shift
 	    break
 	    ;;
 	-*)
-- 
1.6.1.rc3.38.gec9f0

```

## Junio C Hamano, 2008-12-20 20:09

Subject: Re: [PATCH] git-mergetool: properly handle "git mergetool -- filename"
Message-ID: <7vocz6wqvo.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vocz6wqvo.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <593cce2ad8b4d21995b24f0186e846d98306ae60.1229734788.git.davvid@gmail.com>

```
Thanks.

```
