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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 14, 2018, 18:54 UTC
Message-ID
<nycvar.QRO.7.76.6.1808141713510.71@tvgsbejvaqbjf.bet>
In-Reply-To
<CAGZ79kYVw3AXLyB1fx07WojN3dLuxJLDrbWwC_7M=9aoB9YuCg@mail.gmail.com>
Hi Stefan,
On Mon, 13 Aug 2018, Stefan Beller wrote:
Show 15 quoted lines
> > > 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.

>   (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.

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.

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.

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.

Ciao, Dscho

Previous: Stefan BellerNext: Stefan Beller
Message 14 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.