From: Patrick Higgins <patrick.higgins@cexp.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Patrick Higgins <patrick.higgins@cexp.com>
Subject: [PATCH] Added mergetool.kdiff3.doubledash config option
Date: Thu, 12 Jun 2008 13:55:05 -0600 [thread overview]
Message-ID: <1213300505-3867-1-git-send-email-patrick.higgins@cexp.com> (raw)
Qt-only builds of kdiff3 (no KDE) do not support a bare '--' on the command
line. It will fail silently and mysteriously.
Signed-off-by: Patrick Higgins <patrick.higgins@cexp.com>
---
Documentation/config.txt | 6 ++++++
git-mergetool.sh | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 5331b45..da40c2e 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -884,6 +884,12 @@ mergetool.<tool>.trustExitCode::
if the file has been updated, otherwise the user is prompted to
indicate the success of the merge.
+mergetool.kdiff3.doubledash::
+ A boolean to indicate whether or not your kdiff3 supports a '--'
+ on the command line to separate options from filenames. If you
+ built it without KDE, it probably doesn't have this support and
+ you should set this to false. Defaults to true.
+
mergetool.keepBackup::
After performing a merge, the original file with conflict markers
can be saved as a file with a `.orig` extension. If this variable
diff --git a/git-mergetool.sh b/git-mergetool.sh
index fcdec4a..57cbac0 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -181,12 +181,19 @@ merge_file () {
case "$merge_tool" in
kdiff3)
+ doubledash=`git config --bool mergetool.kdiff3.doubledash`
+ if test "$doubledash" = "false"; then
+ double_dash=""
+ else
+ double_dash="--"
+ fi
+
if base_present ; then
("$merge_tool_path" --auto --L1 "$MERGED (Base)" --L2 "$MERGED (Local)" --L3 "$MERGED (Remote)" \
- -o "$MERGED" -- "$BASE" "$LOCAL" "$REMOTE" > /dev/null 2>&1)
+ -o "$MERGED" $double_dash "$BASE" "$LOCAL" "$REMOTE" > /dev/null 2>&1)
else
("$merge_tool_path" --auto --L1 "$MERGED (Local)" --L2 "$MERGED (Remote)" \
- -o "$MERGED" -- "$LOCAL" "$REMOTE" > /dev/null 2>&1)
+ -o "$MERGED" $double_dash "$LOCAL" "$REMOTE" > /dev/null 2>&1)
fi
status=$?
;;
--
1.5.6.rc2
next reply other threads:[~2008-06-12 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 19:55 Patrick Higgins [this message]
2008-06-12 20:36 ` [PATCH] Added mergetool.kdiff3.doubledash config option Junio C Hamano
2008-06-12 22:44 ` Patrick.Higgins
2008-06-13 14:58 ` Theodore Tso
2008-06-14 6:17 ` Junio C Hamano
2008-06-14 6:29 ` Theodore Tso
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=1213300505-3867-1-git-send-email-patrick.higgins@cexp.com \
--to=patrick.higgins@cexp.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).