Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-11-30 11:24:54 +0300
committerJunio C Hamano <gitster@pobox.com>2014-12-01 22:00:18 +0300
commit77a6d84045c8b558d1e08ff2ffe70347b19be6ef (patch)
treed233e6d0b456a28b1102294f8ebc8e37f9a2f2f2 /builtin/count-objects.c
parente3df33bb1b14207848ff339ca27644a01ef17c26 (diff)
count-objects: report unused files in $GIT_DIR/worktrees/...
In linked checkouts, borrowed parts like config is taken from $GIT_COMMON_DIR. $GIT_DIR/config is never used. Report them as garbage. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/count-objects.c')
-rw-r--r--builtin/count-objects.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index e47ef0b1af..ad0c79954a 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -70,8 +70,10 @@ int cmd_count_objects(int argc, const char **argv, const char *prefix)
/* we do not take arguments other than flags for now */
if (argc)
usage_with_options(count_objects_usage, opts);
- if (verbose)
+ if (verbose) {
report_garbage = real_report_garbage;
+ report_linked_checkout_garbage();
+ }
for_each_loose_file_in_objdir(get_object_directory(),
count_loose, count_cruft, NULL, NULL);