MCPcopy Create free account
hub / github.com/git/git / count_loose

Function count_loose

builtin/count-objects.c:61–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static int count_loose(const struct object_id *oid, const char *path,
62 void *data UNUSED)
63{
64 struct stat st;
65
66 if (lstat(path, &st) || !S_ISREG(st.st_mode))
67 loose_garbage(path);
68 else {
69 loose_size += on_disk_bytes(st);
70 loose++;
71 if (verbose && has_object_pack(the_repository, oid))
72 packed_loose++;
73 }
74 return 0;
75}
76
77static int count_cruft(const char *basename UNUSED, const char *path,
78 void *data UNUSED)

Callers

nothing calls this directly

Calls 2

loose_garbageFunction · 0.85
has_object_packFunction · 0.85

Tested by

no test coverage detected