summaryrefslogtreecommitdiffstats
path: root/builtin-verify-pack.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-08-22 21:45:53 +0200
committerJunio C Hamano <gitster@pobox.com>2008-08-23 07:00:22 +0200
commit4b480c6716a7d8e20e7e510827ea81e7939f335a (patch)
tree24c1de905aecbdebfd1c71485de456d0d6660c31 /builtin-verify-pack.c
parentcompat/snprintf.c: handle snprintf's that always return the # chars transmitted (diff)
downloadgit-4b480c6716a7d8e20e7e510827ea81e7939f335a.tar.xz
git-4b480c6716a7d8e20e7e510827ea81e7939f335a.zip
discard revindex data when pack list changes
This is needed to fix verify-pack -v with multiple pack arguments. Also, in theory, revindex data (if any) must be discarded whenever reprepare_packed_git() is called. In practice this is hard to trigger though. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-verify-pack.c')
-rw-r--r--builtin-verify-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-verify-pack.c b/builtin-verify-pack.c
index f4ac595695..25a29f11a4 100644
--- a/builtin-verify-pack.c
+++ b/builtin-verify-pack.c
@@ -1,7 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "pack.h"
-
+#include "pack-revindex.h"
#define MAX_CHAIN 50
@@ -129,6 +129,7 @@ int cmd_verify_pack(int argc, const char **argv, const char *prefix)
else {
if (verify_one_pack(argv[1], verbose))
err = 1;
+ discard_revindex();
nothing_done = 0;
}
argc--; argv++;