Re: [PATCH 1/6] stash: tell setup_revisions() to free our allocated strings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2025, 19:36 UTC
- Message-ID
- <xmqqikhath3d.fsf@gitster.g>
- In-Reply-To
- <20250922190555.GA2205919@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Yeah, I had originally written just: > > test_expect_success 'stash show -- does not leak' ' > git stash show -- > ' > > but it felt funny, since the test is doing nothing in a build without > SANITIZE=leak. If we are OK with that funniness, I can switch back to > that.
We have a prerequisite for that. Very nice vehicle for documentation purposes, even though we do not care about a single "stash show" invocation for correctness or performance reasons.
Perhaps I can squash the following in, unless you have other changes in mind.
t/t3903-stash.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git c/t/t3903-stash.sh w/t/t3903-stash.sh index 7ebeb057d3..930c31e547 100755 --- c/t/t3903-stash.sh +++ w/t/t3903-stash.sh @@ -1741,10 +1741,8 @@ test_expect_success 'submodules does not affect the branch recorded in stash mes ) ' -test_expect_success 'stash show handles --' ' - git stash show >expect && - git stash show -- >actual && - test_cmp expect actual +test_expect_success SANITIZE_LEAK 'stash show handles -- without leaking' ' + git stash show -- ' test_expect_success 'controlled error return on unrecognized option' '