From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>
Subject: [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults"
Date: Mon, 28 Jan 2013 19:28:56 +0000 [thread overview]
Message-ID: <20130128192856.GA7498@serenity.lan> (raw)
---
Junio, please can you squash this into f9924e5 on jk/mergetool,
providing that David is OK with that?
The original change breaks custom mergetool by making changing the logic
around default functions so that they are now only defined when the tool
file exists in $MERGE_TOOLS_DIR but we need the default implementations
when a custom tool is in use, which by definition means that the file
doesn't exist in $MERGE_TOOLS_DIR.
git-mergetool--lib.sh | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 1d0fb12..211ffe5 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -48,15 +48,6 @@ valid_tool () {
setup_tool () {
tool="$1"
- if ! test -f "$MERGE_TOOLS_DIR/$tool"
- then
- # Use a special return code for this case since we want to
- # source "defaults" even when an explicit tool path is
- # configured since the user can use that to override the
- # default path in the scriptlet.
- return 2
- fi
-
# Fallback definitions, to be overriden by tools.
can_merge () {
return 0
@@ -80,6 +71,15 @@ setup_tool () {
echo "$1"
}
+ if ! test -f "$MERGE_TOOLS_DIR/$tool"
+ then
+ # Use a special return code for this case since we want to
+ # source "defaults" even when an explicit tool path is
+ # configured since the user can use that to override the
+ # default path in the scriptlet.
+ return 2
+ fi
+
# Load the redefined functions
. "$MERGE_TOOLS_DIR/$tool"
--
1.8.1.1
next reply other threads:[~2013-01-28 19:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 19:28 John Keeping [this message]
2013-01-29 1:37 ` [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults" David Aguilar
2013-01-29 3:02 ` 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=20130128192856.GA7498@serenity.lan \
--to=john@keeping.me.uk \
--cc=davvid@gmail.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).