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

Re: [PATCH] Avoid invoking diff drivers during git-stash

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 19, 2007, 06:13 UTC
Message-ID
<20071019061351.GL14735@spearce.org>
In-Reply-To
<471849D7.1020303@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 23 quoted lines
> Shawn O. Pearce schrieb:
> > Johannes Sixt <j.sixt@viscovery.net> wrote:
> > > (1) Looking at git-stash.sh I see a few uses of 'git diff' in
> > > apply_stash(). Shouldn't these use one of git-diff-{tree,index,files)? 
> > The
> > > reason is that porcelain 'git diff' invokes custom diff drivers (that 
> > in my   > case run a UI program), whereas the plumbing does not.
> > >
> > > Is there a particular reason to use porcelain 'git diff'?
> >
> > Does this fix the problem?
> 
> It does!
> 
> >@@ -110,7 +110,7 @@ show_stash () {
> > 
> > 	w_commit=$(git rev-parse --verify "$s") &&
> > 	b_commit=$(git rev-parse --verify "$s^") &&
> >-	git diff $flags $b_commit $w_commit
> >+	git diff-tree $flags $b_commit $w_commit
> 
> However, this porcelain 'git diff' should actually remain because it's part 
> of show_stash().

Heh. Damn. I was just starting to prepare my evening push and this patch is in maint, which I just merged to master, and I just rebased all of my pu topic branches over that. Junio's Meta toolkit doesn't have an "unrebase" so I can go back and amend that damn commit before pushing.

I'm feeling lazy and don't want to create an unRB right now. I'll probably just throw another commit into maint to fix the above hunk. Thanks for catching it.

-- 
Shawn.
Previous: Johannes Sixt
Message 8 of 8 in “git stash apply usability issues”
  1. Johannes SixtOct 18, 2007
  2. Steven GrimmOct 18, 2007
  3. Shawn O. PearceOct 19, 2007
  4. Karl HasselströmOct 19, 2007
  5. David KastrupOct 19, 2007
  6. Avoid invoking diff drivers during git-stashShawn O. Pearce, Oct 19, 2007
  7. Johannes SixtOct 19, 2007
  8. Shawn O. PearceOct 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.