Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread John Keeping
On Sun, Jan 27, 2013 at 04:52:25PM -0800, David Aguilar wrote: --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -2,6 +2,35 @@ # git-mergetool--lib is a library for common merge tool functions MERGE_TOOLS_DIR=$(git --exec-path)/mergetools +mode_ok () { + diff_mode

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 04:52:25PM -0800, David Aguilar wrote: --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -2,6 +2,35 @@ # git-mergetool--lib is a library for common merge tool functions MERGE_TOOLS_DIR=$(git --exec-path)/mergetools

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread David Aguilar
On Tue, Jan 29, 2013 at 12:22 PM, Junio C Hamano gits...@pobox.com wrote: John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 04:52:25PM -0800, David Aguilar wrote: --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -2,6 +2,35 @@ # git-mergetool--lib is a library for

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: I don't want to stomp on your feet and poke at this file too much if you're planning on building on top of it (I already did a few times ;-). My git time is a bit limited for the next few days so I don't want to hold you up. I can help shepherd through

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread John Keeping
On Tue, Jan 29, 2013 at 02:27:21PM -0800, David Aguilar wrote: I don't want to stomp on your feet and poke at this file too much if you're planning on building on top of it (I already did a few times ;-). My git time is a bit limited for the next few days so I don't want to hold you up. I

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread John Keeping
On Tue, Jan 29, 2013 at 02:55:26PM -0800, Junio C Hamano wrote: David Aguilar dav...@gmail.com writes: I don't want to stomp on your feet and poke at this file too much if you're planning on building on top of it (I already did a few times ;-). My git time is a bit limited for the next

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Tue, Jan 29, 2013 at 02:55:26PM -0800, Junio C Hamano wrote: ... I can work with John to get this part into a shape to support his extended use sometime toward the end of this week, by which time hopefully you have some time to comment on the

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-29 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Heh, I actually was hoping that you will send in a replacement for David's patch ;-) Here is what I will squash into the one we have been discussing. In a few hours, I expect I'll be able to push this out in the 'pu' branch. I ended up doing this a

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-28 Thread John Keeping
On Sun, Jan 27, 2013 at 04:52:25PM -0800, David Aguilar wrote: Refactor show_tool_help() so that the tool-finding logic is broken out into a separate show_tool_names() function. Signed-off-by: David Aguilar dav...@gmail.com --- filter_tools renamed to show_tool_names() and simplfied to use

Re: [PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-28 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: +printf %s%s\n $per_line_prefix $tool This needs to be: printf $per_line_prefix%s\n $tool since $per_line_prefix is usually '\t\t' which isn't expanded if we format it with %s - an alternative would be to change the value

[PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread David Aguilar
Refactor show_tool_help() so that the tool-finding logic is broken out into a separate show_tool_names() function. Signed-off-by: David Aguilar dav...@gmail.com --- filter_tools renamed to show_tool_names() and simplfied to use ls -1. show_tool_names() now has a preamble as discussed.