Subject: Re: [PATCH] contrib/difftool: use a separate config namespace for difftool commands

From: David Aguilar <[email-masked]>
Date: Tue, 17 Mar 2009 21:35:44 -0700

Junio C Hamano <[email-masked]> wrote:
> Markus Heidelberg <[email-masked]> writes:
> 
> > Jay Soffian <[email-masked]> wrote:
> > > 
> > > Aside, (for Junio I guess...), what's the reason this command is in
> > > contrib, and by what criteria might it graduate to being installed
> > > with the rest of the git commands?
> > > 
> > > j.
> >
> > I'd like to see it as a general git tool, too.
> > Maybe it can even share some common functionality with git-mergetool.
> 
> The code was copied and pasted very heavily, and I think (IIRC) the author
> was a bit too ashamed to have it outside contrib/ before it is properly
> refactored or something like that.  Which I happen to agree with, by the
> way.

I'll work on some patches to get the ball rolling on this.

Here's what I see as the steps I would take:

1. move difftool into the root, update Makefile, etc.

2. factor out the similarities between merge/difftool and
put them in maybe git-tool-lib.sh?

Suggestions/places to look for examples are highly appreciated.
I know we have git-sh-setup but this isn't nearly as generic.

3. adjust merge/difftool to use the common functions

I remember someone mentioning that mergetool should use
hard tabs instead of mixing tabs+spaces so a patch
to fix that up would make sense in there somewhere as well
assuming that's in line with the list's sensibilities.

-- 

	David