Git development
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
To: Steffen Prohaska <prohaska-wjoc1KHpMeg@public.gmane.org>
Cc: Johannes Schindelin
	<Johannes.Schindelin-Mmb7MZpHnFY@public.gmane.org>,
	Kirill <kirillathome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Brian Hetro <whee-Q1H67ocemw/0qnVlFUAYEw@public.gmane.org>,
	msysGit <msysgit-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	Git Mailing List <git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: git gui diff widget (was Re: [msysGit] Re: [cheetah] Questions about NOTES)
Date: Wed, 30 Jan 2008 02:13:04 -0500	[thread overview]
Message-ID: <20080130071304.GS24004@spearce.org> (raw)
In-Reply-To: <75E9DFB9-BE1B-4B60-921D-EE0898DFA9F3-wjoc1KHpMeg@public.gmane.org>


Steffen Prohaska <prohaska-wjoc1KHpMeg@public.gmane.org> wrote:
> On Jan 30, 2008, at 5:03 AM, Shawn O. Pearce wrote:
> >
> >Doing a diff against a random other tree-ish, or between two random
> >tree-ishes would be possible, but a lot more of a challenge.
> >
> >The diff viewer in git-gui isn't exactly a reusable widget.
> >We'd need to refactor that so it could take patch output from any
> >of the patch generating git commands.  Doing such is on my list
> >of things I'd like to fix in git-gui, but I haven't had time to
> >do it yet.
> 
> Hmm, I'm not sure if such a full diff viewer is the most
> important thing to address.  Most users (especially Windows
> users) already have a favorite graphical diff tool and they expect
> a mechanism to plug it into a git workflow.

I hear this a lot from a co-worker.  He really wants a side-by-side
diff tool in git, as he doesn't like reading patches.  Me, I've
never been able to read a side-by-side diff tool, but I can grok
a unified diff quite easily.  To each his own, and git should help
users as much as it can.
 
> I think a tool that presents the list of files with differences
> and can launch an external tool for one of these files would be
> very helpful.  I started to think about a command line version,
> git-difftool, implementing this idea, but do not yet have code.
> A GUI version would be preferable for cheetah anyway.  Maybe the
> patch viewer you sketched above could provide a way to launch an
> external tool for any of the files touched by the patch?  If the
> widget would be reusable maybe it could also be used in gitk?

Yea, that makes sense.  But we may want to go the other way,
that is reuse gitk's patch viewer.  Or something.  The two tools
(git-gui and gitk) grew their diff viewers independently, though
I have to say that git-gui's was inspired by gitk's, and the work
that Paul did on gitool waaaaay back when.

Right now though I doubt there's a single line of code in common
between them.  Hmm, I think they both use the Tk "text" widget.
And a blue-ish color for hunk headers.  :)


Adding a feature to git-gui to launch an external diff of that
file against the index or HEAD shouldn't be too difficult, and I
think is what would be most natural for the current UI.  The ugly
part is pulling out the HEAD/index version into a temporary file
and passing a nice -L (or something like) option to the user's diff
viewer so they don't see the nasty temporary file name, but instead
see a string that matches what git-gui is showing them.  And that
option is going to differ for like every tool out there.  :-\

-- 
Shawn.

  parent reply	other threads:[~2008-01-30  7:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ecf0120c-2bde-407d-8a4e-2f50ea7d4b54@f47g2000hsd.googlegroups.com>
     [not found] ` <alpine.LSU.1.00.0801281126350.23907@racer.site>
     [not found]   ` <20080129031713.GJ24004@spearce.org>
     [not found]     ` <alpine.LSU.1.00.0801291207080.23907@racer.site>
     [not found]       ` <20080130040336.GN24004@spearce.org>
     [not found]         ` <20080130040336.GN24004-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
2008-01-30  7:00           ` git gui diff widget (was Re: [msysGit] Re: [cheetah] Questions about NOTES) Steffen Prohaska
     [not found]             ` <75E9DFB9-BE1B-4B60-921D-EE0898DFA9F3-wjoc1KHpMeg@public.gmane.org>
2008-01-30  7:13               ` Shawn O. Pearce [this message]
     [not found]                 ` <20080130071304.GS24004-o8xcbExO1WpAfugRpC6u6w@public.gmane.org>
2008-01-30  7:58                   ` Thomas Arcila
     [not found]                     ` <1201679921.6348.10.camel-+NgBfe53rIlR1FB8S1TzorOUoyqYp7Dr@public.gmane.org>
2008-01-30 21:14                       ` Steffen Prohaska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080130071304.GS24004@spearce.org \
    --to=spearce-o8xcbexo1wpafugrpc6u6w@public.gmane.org \
    --cc=Johannes.Schindelin-Mmb7MZpHnFY@public.gmane.org \
    --cc=git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kirillathome-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=msysgit-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=prohaska-wjoc1KHpMeg@public.gmane.org \
    --cc=whee-Q1H67ocemw/0qnVlFUAYEw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox