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

Re: [PATCH] mergetool: Use merge.tool config option.

From
James Bowes <jbowes@dangerouslyinc.com>
Date
Mar 19, 2007, 01:11 UTC
Message-ID
<3f80363f0703181811x54acb3f4n689f4fd68f5a5dbe@mail.gmail.com>
In-Reply-To
<7vwt1em6gf.fsf@assigned-by-dhcp.cox.net>
On 3/18/07, Junio C Hamano <junkio@cox.net> wrote:
> The problem description looks correct, but I think the original
> meant to reject configuration value for merge_tool that is not
> supported with the version of the script (and screwed up).

There's a bit later on in mergetool that errors out if you have provided an unknown merge program (either via the command line or through your config). The command line and the config ways should probably behave the same, eh? If so, the case block should be brought up one level like so:

Show 5 quoted lines
> IOW, wouldn't this be a better way?
>
>         if test -z "$merge_tool"
>         then
>                 merge_tool=`git-config merge.tool`
           fi
          case "$merge_tool" in
          kdiff3 | tkdiff | xxdiff | meld | emerge)
                     ;; # happy
          *)
                     echo >&2 "We do not know how to drive $merge_tool"
                     echo >&2 "Resetting to default..."
                     unset merge_tool
                     ;;
          esac
And then remove the 'Unknown mergetool' bit.

I think either way is fine since they both let you know that you've entered gobbledeegook or forgot to install something, so I'll defer to you all for the choice on which way to go.

-James
Previous: Junio C HamanoNext: Theodore Tso
Message 3 of 5 in “mergetool: Use merge.tool config option.”
  1. mergetool: Use merge.tool config option.James Bowes, Mar 18, 2007
  2. Junio C HamanoMar 19, 2007
  3. James BowesMar 19, 2007
  4. Theodore TsoMar 19, 2007
  5. Junio C HamanoMar 19, 2007

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.