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

Re: [PATCH] diff-lib: ignore all outsider if --relative asked

From
Carlo Arenas <carenas@gmail.com>
Date
Aug 19, 2021, 09:02 UTC
Message-ID
<CAPUEspg+LUP59DJ+Z-AqKW0hfz=AbMfvOTFLe1rT5g5auV7gdA@mail.gmail.com>
In-Reply-To
<bc7eda4ed8d52072b929a4af6e4e4ed7478ef9d6.1629361733.git.congdanhqx@gmail.com>

Awesome work, and this not only fixes the crash but a bug in --relative that has been going for a while, after all the documentation clearly says that --relative should filter out entries outside the tree and it does unless in this crashing scenario, which as pointed out was also showing the wrong paths for the diff chunks outside of the directory.

My only concern is that it seems this has been broken for a while (couldn't bisect, but AFAIK the first implementation did filter like this one does), so some people might be expecting the broken behaviour.

got my Tested-by or Reviewed-by and gratitude.
Carlo
Previous: Đoàn Trần Công DanhNext: Junio C Hamano
Message 6 of 8 in “Bug: Segmentation fault in git diff”
  1. Thomas De ZeeuwAug 18, 2021
  2. Đoàn Trần Công DanhAug 18, 2021
  3. Đoàn Trần Công DanhAug 18, 2021
  4. Junio C HamanoAug 18, 2021
  5. diff-lib: ignore all outsider if --relative askedĐoàn Trần Công Danh, Aug 19, 2021
  6. Carlo ArenasAug 19, 2021
  7. Junio C HamanoAug 19, 2021
  8. Junio C HamanoAug 19, 2021

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.