summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-12-04 11:33:07 -0800
committerJunio C Hamano <gitster@pobox.com>2015-12-04 11:33:08 -0800
commitb50ceab48f46a74571ee2a89048563dd5d3322b9 (patch)
tree21275fc64df75a448de3b2a00802ec2c2dfc32d9 /cache.h
parent908a6e4156dff47d4877478383fd4b79592010e2 (diff)
parent478f34d2b6ea13d5f56ecec04de7ca7ce18367c0 (diff)
downloadgit-b50ceab48f46a74571ee2a89048563dd5d3322b9.tar.gz
Merge branch 'dk/gc-idx-wo-pack' into maint
Having a leftover .idx file without corresponding .pack file in the repository hurts performance; "git gc" learned to prune them. We may want to do the same for .bitmap (and notice but not prune .keep) without corresponding .pack, but that can be a separate topic. * dk/gc-idx-wo-pack: gc: remove garbage .idx files from pack dir t5304: test cleaning pack garbage prepare_packed_git(): refactor garbage reporting in pack directory
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index a9aaa0396a..649faa77e3 100644
--- a/cache.h
+++ b/cache.h
@@ -1258,8 +1258,11 @@ struct pack_entry {
extern struct packed_git *parse_pack_index(unsigned char *sha1, const char *idx_path);
-/* A hook for count-objects to report invalid files in pack directory */
-extern void (*report_garbage)(const char *desc, const char *path);
+/* A hook to report invalid files in pack directory */
+#define PACKDIR_FILE_PACK 1
+#define PACKDIR_FILE_IDX 2
+#define PACKDIR_FILE_GARBAGE 4
+extern void (*report_garbage)(unsigned seen_bits, const char *path);
extern void prepare_packed_git(void);
extern void reprepare_packed_git(void);