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

Re: [PATCH] gitk: Use git-difftool for external diffs

From
David Aguilar <davvid@gmail.com>
Date
Nov 20, 2009, 18:55 UTC
Message-ID
<20091120185522.GC56351@gmail.com>
In-Reply-To
<7vhbsp7htq.fsf@alter.siamese.dyndns.org>
On Thu, Nov 19, 2009 at 11:53:37PM -0800, Junio C Hamano wrote:
Show 14 quoted lines
> Paul Mackerras <paulus@samba.org> writes:
> 
> > I have no problem with using git difftool if the underlying git is new
> > enough, I just don't want gitk to explode when it isn't.
> 
> I somehow doubt there are many users who use pre 1.6.3 git but keep their
> gitk separately updated to very recent version, so personally I wouldn't
> worry too much about this.
> 
> > Also, I don't think we should remove the ability for the user to
> > choose which external diff tool to use.
> 
> This is a larger concern.  Does "difftool" allow use of an arbitrary tool
> like how gitk does (I have a suspicion that it is not as flexible)?

difftool supports arbitrary tools through configuration. For arbitrary tools we set difftool.$name.cmd and diff.tool = $name.

If gitk were to have a difftool paradigm then it might be nice to have a text field mapped to the diff.tool variable. The patch didn't address the diff.tool configuration variable so that's a concern if we are to pursue difftool further.

The argument in favor of difftool is one of user expectations. From a user's POV it ~seems~ desirable for gitk to honor difftool configurations. The easiest way for gitk to do that is to use git-difftool and not worry about the details of how arbitrary tools are setup.

Later work could be done to provide UI for setting up arbitrary tools inside of gitk. My gut feeling is that gitk isn't a git config editor.

This is why the difftool patch took the minimalist approach. It trusts the user to have things configured to their liking and trusts git-difftool to do the right thing when no such configuration exists.

I think it's a question of whether this is something we'd want to change. It certainly doesn't bother me either way.

I might be the only person who'd notice such small details so my vote-in-code is with my v2 $TMPDIR patch until someone else thinks that using difftool inside of gitk is a good idea.

At which point I would probably pursue it with the minimalist approach first and then gradually add UI for the pertinent git config variables.

Just my .02,
-- 
		David
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 13 in “gitk: Use git-difftool for external diffs”
  1. gitk: Use git-difftool for external diffsDavid Aguilar, Nov 16, 2009
  2. Paul MackerrasNov 19, 2009
  3. David AguilarNov 19, 2009
  4. Paul MackerrasNov 19, 2009
  5. Junio C HamanoNov 20, 2009
  6. David AguilarNov 20, 2009
  7. Junio C HamanoNov 20, 2009
  8. David AguilarNov 21, 2009
  9. Markus HeidelbergNov 20, 2009
  10. Nanako ShiraishiDec 30, 2009
  11. Junio C HamanoDec 30, 2009
  12. David AguilarDec 31, 2009
  13. Junio C HamanoDec 31, 2009

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.