Re: [PATCH] diff: squelch empty diffs even more

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

Re: [PATCH] diff: squelch empty diffs even more

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:29

René Scharfe [off-list ref] writes:
Hmm.  Like this?

The patch adds a new diff_options bitfield member, no_index, that
is used instead of the special value of -2 of the rev_info field
max_count to indicate that the index is not to be used.  This makes
it possible to pass that flag down to diffcore_skip_stat_unmatch(),
which only has one diff_options parameter.

This could even become a cleanup if we removed all assignments of
max_count to a value of -2 (viz. replacement of a magic value with
a self-documenting field name) but I didn't dare to do that so late
in the rc game..

The no_index bit, if set, then tells diffcore_skip_stat_unmatch()
to not account for any skipped stat-mismatches, which avoids the
suggestion to run git-status.
Yeah, I've always hated that -2 magic hack, and I think this is
the right way to go.  Dscho?

Re: [PATCH] diff: squelch empty diffs even more

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

Hi,

On Tue, 14 Aug 2007, Junio C Hamano wrote:
Yeah, I've always hated that -2 magic hack, and I think this is the 
right way to go.  Dscho?
Right.  It is how I should have done it to begin with.  If I find the time 
(and nobody beats be to it), I'll try to find the rest of the places 
tomorrow, and send a fix.

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