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

Re: [PATCH 2/2] introduce "preciousObjects" repository extension

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 23, 2015, 21:05 UTC
Message-ID
<xmqq1th2cezr.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150623105411.GB12518@peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
>  This extension does not change git's behavior at all. It is useful only
>  for testing format-1 compatibility.
> +
> +`preciousObjects`
> +~~~~~~~~~~~~~~~~~
> +
> +When the config key `extensions.preciousObjects` is set to `true`,
> +objects in the repository MUST NOT be deleted (e.g., by `git-prune` or
> +`git repack -d`).

OK. In essense, the 'extension' on the disk is like 'capability' on the wire, in that you are not supposed to ask for capability they do not understand, and you are not supposed to touch a repository you do not understand.

And the above looks like a reasonable sample "feature" to protect by the 'extension' system.

> +	if (delete_redundant && repository_format_precious_objects)
> +		die("cannot repack in a precious-objects repo");

This message initially threw me off during my cursory reading, but the code tells me that this is only about "repack -d".

Unfortunately the users do not get the chance to read the code; perhaps s/cannot repack/& -d/; or something?

Previous: Jeff KingNext: Jeff King
Message 6 of 13 in “bumping repository format version”
  1. 0/2 bumping repository format versionJeff King, Jun 23, 2015
  2. 1/2 introduce "extensions" form of core.repositoryformatversionJeff King, Jun 23, 2015
  3. 2/2 introduce "preciousObjects" repository extensionJeff King, Jun 23, 2015
  4. Duy NguyenJun 23, 2015
  5. Jeff KingJun 23, 2015
  6. Junio C HamanoJun 23, 2015
  7. Jeff KingJun 24, 2015
  8. Junio C HamanoJun 24, 2015
  9. Jeff KingJun 25, 2015
  10. David TurnerJun 23, 2015
  11. Jeff KingJun 24, 2015
  12. Jeff KingJun 24, 2015
  13. Duy NguyenJun 24, 2015

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.