summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-13 18:02:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-17 16:14:59 (GMT)
commit0a489b0680b841d3e7714be53b263ff190c39193 (patch)
treef340f2070351a966d7a5e7dfa495514642460a1f /path.c
parente88b8586bfd967cbfec62359cf4c53ec65848054 (diff)
downloadgit-0a489b0680b841d3e7714be53b263ff190c39193.zip
git-0a489b0680b841d3e7714be53b263ff190c39193.tar.gz
git-0a489b0680b841d3e7714be53b263ff190c39193.tar.bz2
prepare_packed_git(): refactor garbage reporting in pack directory
The hook to report "garbage" files in $GIT_OBJECT_DIRECTORY/pack/ could be generic but is too specific to count-object's needs. Move the part to produce human-readable messages to count-objects, and refine the interface to callback with the "bits" with values defined in the cache.h header file, so that other callers (e.g. prune) can later use the same mechanism to enumerate different kinds of garbage files and do something intelligent about them, other than reporting in textual messages. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
-rw-r--r--path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/path.c b/path.c
index 10f4cbf..75ec236 100644
--- a/path.c
+++ b/path.c
@@ -143,7 +143,7 @@ void report_linked_checkout_garbage(void)
strbuf_setlen(&sb, len);
strbuf_addstr(&sb, path);
if (file_exists(sb.buf))
- report_garbage("unused in linked checkout", sb.buf);
+ report_garbage(PACKDIR_FILE_GARBAGE, sb.buf);
}
strbuf_release(&sb);
}