Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

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

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:43:43

Shawn,

thanks for the fast response with a patch.

Shawn O. Pearce schrieb:
 Johannes Sixt [off-list ref] 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!
quoted hunk ↗ jump to hunk
@@ -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().

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help