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

Re: [PATCH V5 2/2] git-apply: add --allow-empty flag

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2021, 22:32 UTC
Message-ID
<xmqqee6a3lso.fsf@gitster.g>
In-Reply-To
<xmqqr1ab2c0v.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Surely, I am sympathetic to the intent.  If you are updating "git
> frotz" that is sanitizer-clean, and if you write a new test in a
> test script that happens to be sanitizer-clean, if you introduced a
> new leak to "git frotz", you would appreciate if the CI notices it
> and blocks you.
> ...
> The only time we can sensibly do the "now these are leak-free, and
> we will catch and yell at you when you add a new leak" is when we
> know _all_ git commands are sanitize clean...

There is another scenario where the TEST_PASSES_SANITIZE_LEAK=true may make sense, actually. If we declare that from the time we commit to the approach, until we can mark all the test scripts with the mark, we will put it the sole priority to squash any and all leaks, without doing anything else so that we can finish it the soonest possible.

Then it is probably OK to start at 230 and cover all 940 as fast as we can. Because we are effectively closing the tree for anything but plug-leak changes and adding TEST_PASSES_SANITIZE_LEAK=true line to more tests, we wouldn't have to worry about introducing new leaks to existing tests that are marked as already clean---because of the tree closure, they are more likely to stay clean. t4126 wouldn't have gained a new use of format-patch to break it.

But of course, such an approach is not feasible in this project, where people do not work in lock-step. That leads to the question I asked at the end of my previous message.

Show 7 quoted lines
> Having said that, what would be the next step to help developers to
> avoid introducing new leaks while yelling at them for existing leaks
> they did not introduce and not forbidding them to use git subccommands
> with existing leaks in their tests?
>
> I would prefer an approach that does not force the project to make
> it the highest priority to plug leaks over everything else.
Thanks.
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 11 of 13 in “git-apply: add --quiet flag”
  1. 1/2 git-apply: add --quiet flagJerry Zhang, Dec 13, 2021
  2. 2/2 git-apply: add --allow-empty flagJerry Zhang, Dec 13, 2021
  3. Junio C HamanoDec 16, 2021
  4. t4204 is not sanitizer clean at allJunio C Hamano, Dec 16, 2021
  5. Ævar Arnfjörð BjarmasonDec 17, 2021
  6. Junio C HamanoDec 17, 2021
  7. Ævar Arnfjörð BjarmasonDec 17, 2021
  8. format-patch: mark rev_info with UNLEAKJunio C Hamano, Dec 16, 2021
  9. Ævar Arnfjörð BjarmasonDec 17, 2021
  10. Junio C HamanoDec 17, 2021
  11. Junio C HamanoDec 17, 2021
  12. Ævar Arnfjörð BjarmasonDec 17, 2021
  13. Junio C HamanoDec 13, 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.