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

Re: [PATCH 2/3] builtin/gc: fix condition for whether to write commit graphs

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 11, 2025, 05:48 UTC
Message-ID
<aTpbQt95JHeExceR@pks.im>
In-Reply-To
<gdyc7mdim2p32fesvcb672ssozoom4pdi7dyygacj3s66v7gd4@ydzwijirha3a>
On Wed, Dec 10, 2025 at 01:49:39PM -0600, Justin Tobler wrote:
Show 27 quoted lines
> On 25/12/05 09:19AM, Patrick Steinhardt wrote:
> > diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
> > index 6b36f52df7..6f3117304f 100755
> > --- a/t/t7900-maintenance.sh
> > +++ b/t/t7900-maintenance.sh
> > @@ -206,6 +206,32 @@ test_expect_success 'commit-graph auto condition' '
> >  	test_subcommand $COMMIT_GRAPH_WRITE <cg-two-satisfied.txt
> >  '
> >  
> > +test_expect_success 'commit-graph auto condition with merges' '
> > +	test_when_finished "rm -rf repo" &&
> > +	git init repo &&
> > +	(
> > +		cd repo &&
> > +		git config set maintenance.auto false &&
> > +		git commit --allow-empty -m initial &&
> > +		git switch --create feature &&
> > +		git commit --allow-empty -m feature-1 &&
> > +		git commit --allow-empty -m feature-2 &&
> > +		git switch - &&
> > +		git commit --allow-empty -m main-1 &&
> > +		git commit --allow-empty -m main-2 &&
> > +		git merge feature &&
> > +		git branch -D feature &&
> 
> If we left the feature branch instead of deleting it, would that help
> test that commits are not counted twice?

Indeed! I couldn't make any sense of the results at the beginning of writing this test, but now that I fixed the relveant bugs we can retain the branch.

Patrick
Previous: Justin ToblerNext: Patrick Steinhardt
Message 7 of 26 in “Some random object database related fixes”
  1. 0/3 Some random object database related fixesPatrick Steinhardt, Dec 5, 2025
  2. 1/3 builtin/repack: fix geometric repacks with promisor remotesPatrick Steinhardt, Dec 5, 2025
  3. Justin ToblerDec 10, 2025
  4. Patrick SteinhardtDec 11, 2025
  5. 2/3 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Dec 5, 2025
  6. Justin ToblerDec 10, 2025
  7. Patrick SteinhardtDec 11, 2025
  8. 3/3 odb: properly close sources before freeing themPatrick Steinhardt, Dec 5, 2025
  9. Eric SunshineDec 5, 2025
  10. Patrick SteinhardtDec 6, 2025
  11. Eric SunshineDec 6, 2025
  12. Patrick SteinhardtDec 6, 2025
  13. 0/2 Some random object database related fixesPatrick Steinhardt, Dec 11, 2025
  14. 1/2 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Dec 11, 2025
  15. Toon ClaesDec 11, 2025
  16. Karthik NayakJan 6, 2026
  17. Patrick SteinhardtJan 6, 2026
  18. Karthik NayakJan 6, 2026
  19. 2/2 odb: properly close sources before freeing themPatrick Steinhardt, Dec 11, 2025
  20. Justin ToblerDec 12, 2025
  21. Karthik NayakJan 6, 2026
  22. 0/2 Some random object database related fixesPatrick Steinhardt, Jan 6, 2026
  23. 1/2 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Jan 6, 2026
  24. 2/2 odb: properly close sources before freeing themPatrick Steinhardt, Jan 6, 2026
  25. Karthik NayakJan 6, 2026
  26. Junio C HamanoJan 7, 2026

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.