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

From: Junio C Hamano <[email-masked]>
Date: Tue, 23 Jun 2015 14:05:28 -0700

Jeff King <[email-masked]> writes:

>  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?