From 68be2fea50e7a34c0e5f9fdf6adb9040c8df197f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 16 Nov 2011 22:04:13 -0800 Subject: receive-pack, fetch-pack: reject bogus pack that records objects twice When receive-pack & fetch-pack are run and store the pack obtained over the wire to a local repository, they internally run the index-pack command with the --strict option. Make sure that we reject incoming packfile that records objects twice to avoid spreading such a damage. Signed-off-by: Junio C Hamano --- pack.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pack.h') diff --git a/pack.h b/pack.h index 722a54e00a..aca4739319 100644 --- a/pack.h +++ b/pack.h @@ -37,7 +37,8 @@ struct pack_header { struct pack_idx_option { unsigned flags; /* flag bits */ -#define WRITE_IDX_VERIFY 01 +#define WRITE_IDX_VERIFY 01 /* verify only, do not write the idx file */ +#define WRITE_IDX_STRICT 02 uint32_t version; uint32_t off32_limit; -- cgit v1.2.3