* [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults"
@ 2013-01-28 19:28 John Keeping
2013-01-29 1:37 ` David Aguilar
0 siblings, 1 reply; 3+ messages in thread
From: John Keeping @ 2013-01-28 19:28 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, David Aguilar
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults"
2013-01-28 19:28 [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults" John Keeping
@ 2013-01-29 1:37 ` David Aguilar
2013-01-29 3:02 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: David Aguilar @ 2013-01-29 1:37 UTC (permalink / raw)
To: John Keeping; +Cc: Junio C Hamano, git
On Mon, Jan 28, 2013 at 11:28 AM, John Keeping <john@keeping.me.uk> wrote:
> ---
> Junio, please can you squash this into f9924e5 on jk/mergetool,
> providing that David is OK with that?
This looks good to me.
> 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
--
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults"
2013-01-29 1:37 ` David Aguilar
@ 2013-01-29 3:02 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2013-01-29 3:02 UTC (permalink / raw)
To: David Aguilar; +Cc: John Keeping, git
David Aguilar <davvid@gmail.com> writes:
> On Mon, Jan 28, 2013 at 11:28 AM, John Keeping <john@keeping.me.uk> wrote:
>> ---
>> Junio, please can you squash this into f9924e5 on jk/mergetool,
>> providing that David is OK with that?
>
> This looks good to me.
Thanks for a quick response. Will squash this in and rebuild the
two affected branches.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-29 3:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28 19:28 [PATCH] fixup! mergetools: simplify how we handle "vim" and "defaults" John Keeping
2013-01-29 1:37 ` David Aguilar
2013-01-29 3:02 ` 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).