Hi Stefan,

On Mon, 23 Jul 2018, Stefan Beller wrote:

> On Sat, Jul 21, 2018 at 3:05 PM Johannes Schindelin via GitGitGadget
> <gitgitgad...@gmail.com> wrote:
> >
> > From: Johannes Schindelin <johannes.schinde...@gmx.de>
> >
> > When displaying a diff of diffs, it is possible that there is an outer
> > `+` before a context line. That happens when the context changed between
> > old and new commit. When that context line starts with a tab (after the
> > space that marks it as context line), our diff machinery spits out a
> > white-space error (space before tab), but in this case, that is
> > incorrect.
> >
> > Fix this by adding a specific whitespace flag that simply ignores the
> > first space in the output.
> 
> That sounds like a simple (not easy) solution, which sounds acceptable
> to me here.
> 
> I guess you dropped all ideas that I originally proposed for the cleanup
> regarding ws. that is fine, I can roll the cleanup on top of your patches
> here.

Yes, sorry, I got the impression after our chat on IRC that you tried to
address something different from what I needed, anyway?

> > Note: as the original code did not leave any space in the bit mask
> > before the WSEH_* bits, the diff of this commit looks unnecessarily
> > involved: the diff is dominated by making room for one more bit to be
> > used by the whitespace rules.
> 
> It took me some minutes, but I am reasonably convinced this patch
> is correct (and doesn't collide with other series in flight, 
> sb/diff-color-more
> adds another flag to move detection in another bit field at (1<<23))
> 
> Thanks for writing this patch instead of the other, though I'll leave
> it to Junio to weigh in if this approach is the best design.

I am sorry that your time was wasted in addition to mine: I will go with a
simple one-line patch in v5 instead, a single line that simply disables
white-space errors altogether in dual color mode.

Ciao,
Dscho

Reply via email to