git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] mergetool--lib: fix startup options for gvimdiff tool

From
David Aguilar <davvid@gmail.com>
Date
Jan 25, 2013, 05:07 UTC
Message-ID
<CAJDDKr4Zi-pVVtX4LxRv9K7ocjdpLS_5NH5P_wrx0+ZRSwmfFA@mail.gmail.com>
In-Reply-To
<1359011768-7665-1-git-send-email-Alex.Crezoff@gmail.com>
On Wed, Jan 23, 2013 at 11:16 PM, Alexey Shumkin <alex.crezoff@gmail.com> wrote:
Show 6 quoted lines
> Options are taken from <Git source>/mergetools/vim
>
> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
> ---
>  git-gui/lib/mergetool.tcl | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
A better long-term solution might be to teach git gui to use "git difftool".

Would it be better to teach git-gui (and gitk) about mergetool/difftool? That would allow us to possibly eliminate this duplication.

We did start towards that path when difftool learned the --extcmd option (for use by gitk) but I have not followed through.

What do you think about trying that approach?
Show 26 quoted lines
> diff --git a/git-gui/lib/mergetool.tcl b/git-gui/lib/mergetool.tcl
> index 3c8e73b..4fc1cab 100644
> --- a/git-gui/lib/mergetool.tcl
> +++ b/git-gui/lib/mergetool.tcl
> @@ -211,7 +211,13 @@ proc merge_resolve_tool2 {} {
>                 }
>         }
>         gvimdiff {
> -               set cmdline [list "$merge_tool_path" -f "$LOCAL" "$MERGED" "$REMOTE"]
> +               if {$base_stage ne {}} {
> +                       set cmdline [list "$merge_tool_path" -f -d -c "wincmd J" \
> +                               "$MERGED" "$LOCAL" "$BASE" "$REMOTE"]
> +               } else {
> +                       set cmdline [list "$merge_tool_path" -f -d -c "wincmd l" \
> +                               "$LOCAL" "$MERGED" "$REMOTE"]
> +               }
>         }
>         kdiff3 {
>                 if {$base_stage ne {}} {
> --
> 1.8.1.1.10.g9255f3f
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
David
Previous: Alexey ShumkinNext: Alexey Shumkin
Message 4 of 5 in “mergetool--lib: fix startup options for gvimdiff tool”
  1. 1/3 mergetool--lib: fix startup options for gvimdiff toolAlexey Shumkin, Jan 24, 2013
  2. 2/3 mergetool--lib: Add diffuse as a toolAlexey Shumkin, Jan 24, 2013
  3. 3/3 mergetool--lib: Add TortoiseMerge as a toolAlexey Shumkin, Jan 24, 2013
  4. David AguilarJan 25, 2013
  5. Alexey ShumkinJan 25, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.