Re: [PATCH 1/2] commit-graph: add trace2 instrumentation for generation DFS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 10, 2026, 22:28 UTC
- Message-ID
- <xmqqik6mbhtw.fsf@gitster.g>
- In-Reply-To
- <alFthqGQjsowvpEz@com-79390>
Taylor Blau <ttaylorr@openai.com> writes:
Show 16 quoted lines
> On Tue, Jul 07, 2026 at 04:08:36PM +0200, Kristofer Karlsson wrote: >> > Instead of writing "# BUG ..." and then an incorrect assertion, I >> > would suggest that you write the assertion you expect: >> > >> > test_trace2_data commit-graph generation-dfs-steps 1 <trace.txt >> > >> > , but mark the test as "test_expect_failure". >> >> I started with this actually and then changed my mind in order >> to demonstrate exactly how the counter changed, not just that it >> changed from failure to success. But I'd be happy to change this >> too if needed - it would effectively reduce the second commit to >> just the bugfix line and switching from test_expect_failure >> to test_expect_success. > > Yeah, I think this would be ideal.
If the test involved is longer than 3 lines, I would recommend against it, as "git show" of such a patch will show the full code change to implement a different behaviour plus "_failure" changing to "_success" in the test, with the body of the test hidden outside the context, which makes it hard to guess what the behaviour change is really about.