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

Re: [PATCH] diff: fix a segfault in >2 tree -I<regex> and --output=<file>

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2022, 19:38 UTC
Message-ID
<xmqqmtf6hgae.fsf@gitster.g>
In-Reply-To
<220524.86leurw3my.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 5 quoted lines
> I.e. the "right" thing to do in this case would require a much more
> involved fix. We've somehow ended up not supporting --output=<file>, -I
> and probably many other options in the combined-diff mode, which both in
> testing and in this part of the implementation seems to have become an
> afterthought.
OK, a hopefully final question.

How much less involved is it to add a new code (without doing anything in this patch) to detect and die on the combination of combined-diff with these two options, so that we can document the fact that we do not support them? It would give us much better way forward than leaving the command silently ignore and give result that is not in line with what was asked, wouldn't it? That way, the much more involved "fix" will turn into a change to add a missing feature.

Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 of 12 in “Bug: combined diff with --ignore-matching-lines”
  1. René ScharfeMay 14, 2022
  2. diff: fix a segfault in >2 tree -I<regex> and --output=<file>Ævar Arnfjörð Bjarmason, May 23, 2022
  3. Junio C HamanoMay 23, 2022
  4. Ævar Arnfjörð BjarmasonMay 24, 2022
  5. Junio C HamanoMay 24, 2022
  6. Ævar Arnfjörð BjarmasonMay 24, 2022
  7. René ScharfeJun 18, 2022
  8. 1/2 combine-diff: abort if --ignore-matching-lines is givenRené Scharfe, Jun 18, 2022
  9. Junio C HamanoJun 21, 2022
  10. René ScharfeJun 21, 2022
  11. Junio C HamanoJun 21, 2022
  12. 2/2 combine-diff: abort if --output is givenRené Scharfe, Jun 18, 2022

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.