* [PATCH] git-mergetool: properly handle "git mergetool -- filename"
@ 2008-10-15 7:39 David Aguilar
0 siblings, 0 replies; 3+ messages in thread
From: David Aguilar @ 2008-10-15 7:39 UTC (permalink / raw)
To: gitster; +Cc: git, tytso, David Aguilar
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] git-mergetool: properly handle "git mergetool -- filename"
@ 2008-12-20 1:01 David Aguilar
2008-12-20 20:09 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: David Aguilar @ 2008-12-20 1:01 UTC (permalink / raw)
To: gitster; +Cc: git, David Aguilar
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] git-mergetool: properly handle "git mergetool -- filename"
2008-12-20 1:01 David Aguilar
@ 2008-12-20 20:09 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-12-20 20:09 UTC (permalink / raw)
To: David Aguilar; +Cc: git
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-20 20:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 7:39 [PATCH] git-mergetool: properly handle "git mergetool -- filename" David Aguilar
-- strict thread matches above, loose matches on Subject: below --
2008-12-20 1:01 David Aguilar
2008-12-20 20:09 ` Junio C Hamano
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).