Re: [PATCH 2/2] introduce "preciousObjects" repository extension
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 23, 2015, 11:14 UTC
- Message-ID
- <CACsJy8AR_vZLAAKf4P+aEtKu1u35N8kAYtYLNOg55ET8DWeZUA@mail.gmail.com>
- In-Reply-To
- <20150623105411.GB12518@peff.net>
On Tue, Jun 23, 2015 at 5:54 PM, Jeff King <peff@peff.net> wrote:
Show 28 quoted lines
> diff --git a/builtin/prune.c b/builtin/prune.c
> index 0c73246..fc0c8e8 100644
> --- a/builtin/prune.c
> +++ b/builtin/prune.c
> @@ -218,6 +218,9 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
> return 0;
> }
>
> + if (repository_format_precious_objects)
> + die("cannot prune in a precious-objects repo");
> +
> while (argc--) {
> unsigned char sha1[20];
> const char *name = *argv++;
> diff --git a/builtin/repack.c b/builtin/repack.c
> index af7340c..8ae7fe5 100644
> --- a/builtin/repack.c
> +++ b/builtin/repack.c
> @@ -193,6 +193,9 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
> argc = parse_options(argc, argv, prefix, builtin_repack_options,
> git_repack_usage, 0);
>
> + if (delete_redundant && repository_format_precious_objects)
> + die("cannot repack in a precious-objects repo");
> +
> if (pack_kept_objects < 0)
> pack_kept_objects = write_bitmaps;
>I know both commands have translatable strings that are not marked with _(). But if you reroll, maybe you could add _() for these new strings. It's even better if you mark all others in these commands too, if you have time.
-- Duy