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

Re: What's cooking in git.git (Feb 2017, #03; Fri, 10)

From
René Scharfe <l.s.r@web.de>
Date
Feb 10, 2017, 23:05 UTC
Message-ID
<77af28f3-7a8e-fc6a-40ae-c4203d1a3a67@web.de>
In-Reply-To
<xmqq37flk7l4.fsf@gitster.mtv.corp.google.com>
Am 10.02.2017 um 23:24 schrieb Junio C Hamano:
Show 10 quoted lines
> * vn/xdiff-func-context (2017-01-15) 1 commit
>  - xdiff -W: relax end-of-file function detection
>
>  "git diff -W" has been taught to handle the case where a new
>  function is added at the end of the file better.
>
>  Will hold.
>  Discussion on an follow-up change to go back from the line that
>  matches the funcline to show comments before the function
>  definition has not resulted in an actionable conclusion.
This one is a bug fix and can be merged already IMHO.

I have raw patches for showing comments before functions with -W, but they don't handle the case of a change being within such a comment. We'd want to show the trailing function which it is referring to in such a case, right?

And that's a bit tricky because it requires a more complicated model: Currently we distinguish only between function lines and the rest, while the new way would require identifying leading comment lines and probably also trailing function body lines in addition to that, and neither can be classified simply by looking at the line in question -- their type depends on that of neighboring lines.

René
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 5 in “What's cooking in git.git (Feb 2017, #03; Fri, 10)”
  1. Junio C HamanoFeb 10, 2017
  2. René ScharfeFeb 10, 2017
  3. Junio C HamanoFeb 11, 2017
  4. Vegard NossumFeb 12, 2017
  5. René ScharfeFeb 12, 2017

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.