diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-11-30 15:24:54 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-01 11:00:18 -0800 |
commit | 77a6d84045c8b558d1e08ff2ffe70347b19be6ef (patch) | |
tree | d233e6d0b456a28b1102294f8ebc8e37f9a2f2f2 /builtin/count-objects.c | |
parent | e3df33bb1b14207848ff339ca27644a01ef17c26 (diff) | |
download | git-77a6d84045c8b558d1e08ff2ffe70347b19be6ef.tar.gz git-77a6d84045c8b558d1e08ff2ffe70347b19be6ef.tar.xz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/count-objects.c b/builtin/count-objects.c index e47ef0b1a..ad0c79954 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); |