Johannes Schindelin <[EMAIL PROTECTED]> wrote: > On Mon, 28 Jan 2008, Shawn O. Pearce wrote: > > Johannes Schindelin <[EMAIL PROTECTED]> wrote: > > > > > > Another thing (and this concerns you, Shawn): there is this lovely > > > program called git-gui, and it has most of what we will ever want to > > > drive from git-cheetah. Is there any method to call git-gui such that > > > it performs a certain command, or is there a chance to get such a > > > method? > > I did not mean to remote control it, just to start it with a default > action, such as "diff file <xyz> to HEAD", or "diff directory <xyz> to > index".
Oh, like we do for `git gui blame HEAD file` ? :-) That isn't too difficult. git-gui currently cannot show a diff of a directory, it can only diff a single file at a time, but yea, it wouldn't be hard to add a `git gui diff file` to have it open up and show the current difference of index<->file or HEAD<->index for that path. 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. -- Shawn.
