Re: [PATCH] Make 'diff C^!' show the same diff as 'show C'

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Make 'diff C^!' show the same diff as 'show C'

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:17

Thomas Rast [off-list ref] writes:
Ideally, we'd like 'git diff C^!' to show the same diff that 'git show C'
does (with log.showroot enabled).  This gives easy access to a readable
diff for the commit, irrespective of how many parents it has and without
any trickery to remove the commit message from the git-show output.
Not interested yet, as the "git show" discussion is not convincing at all.

Is the message annoying enough to warrant this change?

If that is indeed the case and if it is a common thing to ask, isn't it
more productive to teach "show" a way to do so in a simpler way than
doing, say,

	$ git show --pretty=format: HEAD

Re: [PATCH] Make 'diff C^!' show the same diff as 'show C'

From: Jeff King <hidden>
Date: 2016-06-15 22:47:17

On Thu, Aug 20, 2009 at 03:25:16PM -0700, Junio C Hamano wrote:
Thomas Rast [off-list ref] writes:
quoted
Ideally, we'd like 'git diff C^!' to show the same diff that 'git show C'
does (with log.showroot enabled).  This gives easy access to a readable
diff for the commit, irrespective of how many parents it has and without
any trickery to remove the commit message from the git-show output.
Not interested yet, as the "git show" discussion is not convincing at all.

Is the message annoying enough to warrant this change?
I thought the same thing when I saw his message, but reading further,
the current output is nonsensical. So if not this patch, we should
probably at least complain about bogus input and die (though if it is
easy to make it work, why not...).

-Peff

Re: [PATCH] Make 'diff C^!' show the same diff as 'show C'

From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:17

Junio C Hamano wrote:
Thomas Rast [off-list ref] writes:
quoted
Ideally, we'd like 'git diff C^!' to show the same diff that 'git show C'
does (with log.showroot enabled).  This gives easy access to a readable
diff for the commit, irrespective of how many parents it has and without
any trickery to remove the commit message from the git-show output.
Not interested yet, as the "git show" discussion is not convincing at all.
Well, it is currently half-supported, diff doesn't complain about it,
yet it does something wildly different from what people expect in the
zero- and two-parent cases.

And yes, people expect this to work; searching the #git logs (I won't
link here as it takes a fair while even for one request) shows that
people such as Dscho, Thiago, Jakub and Björn have recommended this
syntax in the context of diff.
Is the message annoying enough to warrant this change?

If that is indeed the case and if it is a common thing to ask, isn't it
more productive to teach "show" a way to do so in a simpler way than
doing, say,

	$ git show --pretty=format: HEAD
That still doesn't get rid of the stray newline.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help