pack-mtimes: support writing pack .mtimes files

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.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Taylor Blau
2022-05-20 19:17:43 -04:00
committed by Junio C Hamano
parent d9fef9d90d
commit 5dfaf49a5a
4 changed files with 109 additions and 0 deletions

1
pack.h
View File

@ -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;