summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-11-20 11:55:34 (GMT)
committerJeff King <peff@peff.net>2015-11-20 11:55:34 (GMT)
commit45014beac004a610938a265698605c18ab126087 (patch)
tree97b7dcfd2a4edf2e0044cb1f498a902aea158441 /cache.h
parentf34be46e47773d03e9d09641209121591a6b37c8 (diff)
parent478f34d2b6ea13d5f56ecec04de7ca7ce18367c0 (diff)
downloadgit-45014beac004a610938a265698605c18ab126087.zip
git-45014beac004a610938a265698605c18ab126087.tar.gz
git-45014beac004a610938a265698605c18ab126087.tar.bz2
Merge branch 'dk/gc-idx-wo-pack'
Having a leftover .idx file without corresponding .pack file in the repository hurts performance; "git gc" learned to prune them. * 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 3ba0b8f..736abc0 100644
--- a/cache.h
+++ b/cache.h
@@ -1289,8 +1289,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);