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

Re: [PATCH v2 1/2] BreakingChanges: announce switch to "reftable" format

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 3, 2025, 11:42 UTC
Message-ID
<aGZslJSks2GF3uB7@pks.im>
In-Reply-To
<CAOLa=ZTJOqqr25Sj0YSAc9rDmar2qZiVD3H+K6qhdN3qKdqbGw@mail.gmail.com>
On Thu, Jul 03, 2025 at 12:54:24PM +0200, Karthik Nayak wrote:
Show 16 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> > diff --git a/setup.c b/setup.c
> > index f93bd6a24a5..f0c06c655a9 100644
> > --- a/setup.c
> > +++ b/setup.c
> > @@ -2541,6 +2541,8 @@ static void repository_format_configure(struct repository_format *repo_fmt,
> >  			repo_fmt->ref_storage_format = ref_format;
> >  	} else if (cfg.ref_format != REF_STORAGE_FORMAT_UNKNOWN) {
> >  		repo_fmt->ref_storage_format = cfg.ref_format;
> > +	} else {
> > +		repo_fmt->ref_storage_format = REF_STORAGE_FORMAT_DEFAULT;
> >  	}
> >  	repo_set_ref_storage_format(the_repository, repo_fmt->ref_storage_format);
> >  }
> 
> Shouldn't this change be instead made to REPOSITORY_FORMAT_INIT?

It made me a bit uneasy to change `REPOSITORY_FORMAT_INIT` as it is used in several places. So I opted for the more contained change.

In any case, I found the logic to be hard to follow anyway as it is not immediately clear where the default value actually comes from without the `else` branch. So I consider it a good change regardless. In fact, I would argue we could go even further and change `REPOSITORY_FORMAT_INIT` to be set to `_UNKNOWN`. Same for the hash.

Patrick
Previous: Karthik NayakNext: Karthik Nayak
Message 13 of 21 in “Add reftable by default as a breaking change”
  1. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 2, 2025
  2. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 2, 2025
  3. Junio C HamanoJul 2, 2025
  4. brian m. carlsonJul 2, 2025
  5. Patrick SteinhardtJul 3, 2025
  6. Patrick SteinhardtJul 3, 2025
  7. Justin ToblerJul 2, 2025
  8. Patrick SteinhardtJul 3, 2025
  9. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 2, 2025
  10. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 3, 2025
  11. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 3, 2025
  12. Karthik NayakJul 3, 2025
  13. Patrick SteinhardtJul 3, 2025
  14. Karthik NayakJul 3, 2025
  15. Patrick SteinhardtJul 3, 2025
  16. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 3, 2025
  17. Junio C HamanoJul 7, 2025
  18. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 4, 2025
  19. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 4, 2025
  20. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 4, 2025
  21. Karthik NayakJul 4, 2025

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.