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

Re: [PATCH 4/4] range-diff: indent special lines as context

From
Stefan Beller <sbeller@google.com>
Date
Aug 14, 2018, 19:05 UTC
Message-ID
<CAGZ79kZhLsUZL+bfoovV+U6W-zX6npERRG86fS8+1GsTQmKoHA@mail.gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1808141713510.71@tvgsbejvaqbjf.bet>

On Tue, Aug 14, 2018 at 11:54 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 28 quoted lines
>
> Hi Stefan,
>
> On Mon, 13 Aug 2018, Stefan Beller wrote:
>
> > > > The later lines that indicate a change to the Makefile will be treated as
> > > > context both in the outer and inner diff, such that those lines stay
> > > > regular color.
> > >
> > > While I am a fan of having those lines colored correctly, I have to admit
> > > that I am not exactly enthusiastic about that extra indentation...
> > >
> > > Otherwise, this looks good to me.
> >
> > Can you explain what makes you less enthused about the indentation?
> >
> > Advantage:
> > * allows easy coloring (easy implementation)
> > Disadvantage:
> > * formats change,
>
> This is it. It breaks my visual flow.
>
> > but the range diff is still in its early design phase, so we're not
> > breaking things, yet?
>
> Indeed. We're not breaking things. If you feel strongly about it, we can
> have that indentation, I *can* get used to it.

I only feel strongly about it now as that is the *easiest* way to make the colors look like I want them to look. And I really value colors in the range-diff. Earlier you said that color-less range-diff is nearly useless for you and I thought it was hyperbole, but by now I realize how much truth you spoke. So getting the colors fixed to not markup files (+++/ --- lines of the inner diff) is a high priority for me. So high that I would compromise on the indentation/flow of these corner case areas.

Show 11 quoted lines
> >   (Do we ever plan on sending range-diff patches that can be applied to
> >   rewrite history? I am very uncertain on such a feature request.  It
> >   sounds cool, though)
>
> I remember that I heard you discussing this internally. I am not too big a
> fan of this idea, I have to admit. The range diff seems more designed to
> explain how a patch series evolved, rather than providing machine-readable
> data that allows to recreate said evolution. For example, the committer
> information as well as the date are missing, which would preclude a
> faithful reconstruction.
>

Ah! good point. Though we could just work around that and use the email date for the new author dates. ;-)

> And that is not all: if you wanted to "apply" a range diff, you would need
> to know more about the base(s) of the two commit ranges. You would need to
> know that they are at least very similar to the base onto which you want
> to apply this.

You would say so in the cover letter "This is a resend of sb/range-diff-colors" and by the knowledge of that tip only and the range-diff you would know how the new series would look like, even if it was rebased.

> And quite seriously, this would be the wrong way to go in my mind. We have
> a very efficient data format to transport all of that information: the Git
> bundle.

The bundle format is very efficient for machine transport, but I thought the whole point of the mailing list was easy human readable parts, i.e. you can point out things in a diff, which you could also do in a range-diff to some extend. We would loose some of the "fresh eyes" as you'd only see the changed part of the series. :-/ So yeah even for the workflow this seems a net-negative. I just thought it would be cool.

Show 5 quoted lines
> Let's not overload the range diff format with multiple, partially
> contradicting purposes. Think "separation of concerns". It's the same
> issue, really, as trying to send highly structured data such as bug
> reports or code contributions via a medium meant to send unstructured
> plain or formatted text back and forth between human beings.
ok.

Thanks, Stefan

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 15 of 27 in “Better colors in range-diff!”
  1. 0/4 Better colors in range-diff!Stefan Beller, Aug 10, 2018
  2. 1/4 diff.c: emit_line_0 to take string instead of first signStefan Beller, Aug 10, 2018
  3. Johannes SchindelinAug 13, 2018
  4. Stefan BellerAug 13, 2018
  5. 2/4 diff.c: add --output-indicator-{new, old, context}Stefan Beller, Aug 10, 2018
  6. Johannes SchindelinAug 13, 2018
  7. Stefan BellerAug 13, 2018
  8. 3/4 range-diff: make use of different output indicatorsStefan Beller, Aug 10, 2018
  9. Johannes SchindelinAug 13, 2018
  10. Stefan BellerAug 13, 2018
  11. 4/4 range-diff: indent special lines as contextStefan Beller, Aug 10, 2018
  12. Johannes SchindelinAug 13, 2018
  13. Stefan BellerAug 13, 2018
  14. Johannes SchindelinAug 14, 2018
  15. Stefan BellerAug 14, 2018
  16. Johannes SchindelinAug 16, 2018
  17. 0/3 Better colors in range-diffStefan Beller, Aug 17, 2018
  18. 1/3 diff.c: add --output-indicator-{new, old, context}Stefan Beller, Aug 17, 2018
  19. Johannes SchindelinAug 20, 2018
  20. Stefan BellerAug 20, 2018
  21. Johannes SchindelinAug 21, 2018
  22. diff.c: pass sign_index to emit_line_ws_markupStefan Beller, Aug 22, 2018
  23. Johannes SchindelinAug 23, 2018
  24. 2/3 range-diff: make use of different output indicatorsStefan Beller, Aug 17, 2018
  25. 3/3 range-diff: indent special lines as contextStefan Beller, Aug 17, 2018
  26. Junio C HamanoAug 17, 2018
  27. Stefan BellerAug 17, 2018

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.