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

Re: [RFC PATCH 2/4] range-diff: don't remove funcname from inner diff

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
Apr 24, 2019, 18:15 UTC
Message-ID
<20190424181504.GA2068@hank.intra.tgummerer.com>
In-Reply-To
<nycvar.QRO.7.76.6.1904171350310.46@tvgsbejvaqbjf.bet>
On 04/17, Johannes Schindelin wrote:
Show 15 quoted lines
> Hi Thomas,
> 
> On Mon, 15 Apr 2019, Thomas Gummerer wrote:
> > I like declaring this a bug.  We are after all parsing
> > machine-generated output, that does come from git (which is why I
> > neglected the NULL checking in the first place).  If that second "@@"
> > is not there it's definitely a bug somewhere in the diff machinery,
> > I'd say.
> 
> Ah, but you do know about the micro-project I proposed to optionally feed
> an mbox to `range-diff`, right?
> 
> The idea behind my proposal is that this would make it possible to
> generate a range-diff between the patches on public-inbox and the commits
> that actually made it into Junio's `pu`...

I had forgotten about that, and was only looking at what the code currently does.

Show 9 quoted lines
> > Note that the "@@" also couldn't come from anywhere else, the diff
> > header has a well defined format and so does the metadata.  The diff
> > itself is prefixed with '<', '>' and '#' in this case, and the commit
> > message is also prefixed with four spaces.  So if this breaks
> > somewhere I'd rather hear about it loudly, than let users potentially
> > get wrong output because we missed something somewhere.
> 
> Agreed. But I could imagine that `die()`ing here would be the more
> appropriate way to holler loudly ;-)

Yup, in the light of the potential microproject, I'm fine with just 'die()'ing here. If we'd get into this situation right now, there would probably be a bunch of other tests failing as well, so we might as well make it a little more future proof. Thanks.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 17 of 29 in “incorrect range-diff output?”
  1. Duy NguyenApr 11, 2019
  2. Thomas GummererApr 11, 2019
  3. Johannes SchindelinApr 12, 2019
  4. Thomas GummererApr 14, 2019
  5. Duy NguyenApr 12, 2019
  6. Junio C HamanoApr 12, 2019
  7. Thomas GummererApr 14, 2019
  8. Junio C HamanoApr 15, 2019
  9. Johannes SchindelinApr 15, 2019
  10. 0/4 output improvements for git range-diffThomas Gummerer, Apr 14, 2019
  11. 1/4 range-diff: fix function parameter indentationThomas Gummerer, Apr 14, 2019
  12. 2/4 range-diff: don't remove funcname from inner diffThomas Gummerer, Apr 14, 2019
  13. Eric SunshineApr 14, 2019
  14. Johannes SchindelinApr 15, 2019
  15. Thomas GummererApr 15, 2019
  16. Johannes SchindelinApr 17, 2019
  17. Thomas GummererApr 24, 2019
  18. Johannes SchindelinApr 15, 2019
  19. Thomas GummererApr 15, 2019
  20. 3/4 range-diff: add section header instead of diff headerThomas Gummerer, Apr 14, 2019
  21. Eric SunshineApr 14, 2019
  22. Johannes SixtApr 15, 2019
  23. Johannes SchindelinApr 15, 2019
  24. Thomas GummererApr 15, 2019
  25. 4/4 range-diff: add section headers to the outer hunk headerThomas Gummerer, Apr 14, 2019
  26. Johannes SchindelinApr 15, 2019
  27. Thomas GummererApr 15, 2019
  28. Johannes SchindelinApr 15, 2019
  29. Thomas GummererApr 15, 2019

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.