From: David Aguilar <davvid@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, tytso@mit.edu, David Aguilar <davvid@gmail.com>
Subject: [PATCH] git-mergetool: properly handle "git mergetool -- filename"
Date: Wed, 15 Oct 2008 00:39:53 -0700 [thread overview]
Message-ID: <36715524a8e3a4688024cc1e23dd1518c4df71a0.1224056291.git.davvid@gmail.com> (raw)
git-mergetool has an entry for "--" in its command-line parsing code
to designate the end of option processing. It was not calling shift,
though, which caused git-mergetool to incorrectly use "--" as the
merge filename.
This patch fixes this bug and updates the usage and documentation
to include [--] in the options spec.
Signed-off-by: David Aguilar <davvid@gmail.com>
---
Documentation/git-mergetool.txt | 2 +-
git-mergetool.sh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt
index e0b2703..475db72 100644
--- a/Documentation/git-mergetool.txt
+++ b/Documentation/git-mergetool.txt
@@ -7,7 +7,7 @@ git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
SYNOPSIS
--------
-'git mergetool' [--tool=<tool>] [<file>]...
+'git mergetool' [--tool=<tool>] [--] [<file>]...
DESCRIPTION
-----------
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 94187c3..1b0dfec 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -8,7 +8,7 @@
# at the discretion of Junio C Hamano.
#
-USAGE='[--tool=tool] [file to merge] ...'
+USAGE='[--tool=tool] [--] [file to merge] ...'
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=
. git-sh-setup
@@ -296,6 +296,7 @@ do
esac
;;
--)
+ shift
break
;;
-*)
--
1.6.0.2.532.g84ed4c
next reply other threads:[~2008-10-15 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 7:39 David Aguilar [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-20 1:01 [PATCH] git-mergetool: properly handle "git mergetool -- filename" David Aguilar
2008-12-20 20:09 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36715524a8e3a4688024cc1e23dd1518c4df71a0.1224056291.git.davvid@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).