Re: [PATCH v3 05/17] pack-mtimes: support writing pack .mtimes files
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 3, 2022, 16:45 UTC
- Message-ID
- <220303.86ee3j2dae.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <0600503856dbccb135aaead27693b6815a774b4f.1646266835.git.me@ttaylorr.com>
On Wed, Mar 02 2022, Taylor Blau wrote:
Show 18 quoted lines
> Now that the `.mtimes` format is defined, supplement the pack-write API
> to be able to conditionally write an `.mtimes` file along with a pack by
> setting an additional flag and passing an oidmap that contains the
> timestamps corresponding to each object in the pack.
> [...]
> void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought)
> diff --git a/pack.h b/pack.h
> index fd27cfdfd7..01d385903a 100644
> --- a/pack.h
> +++ b/pack.h
> @@ -44,6 +44,7 @@ struct pack_idx_option {
> #define WRITE_IDX_STRICT 02
> #define WRITE_REV 04
> #define WRITE_REV_VERIFY 010
> +#define WRITE_MTIMES 020
>
> uint32_t version;
> uint32_t off32_limit;Why the hardcoding? The 010 was added in your 8ef50d9958f (pack-write.c: prepare to write 'pack-*.rev' files, 2021-01-25). That would be the same as 8|2, but there's no 8 there., ditto this new 020 that's the same as 1<<4 | 1<<2, but there's no "16", just WRITE_REV=4.