diff options
| author | Jeff King <peff@peff.net> | 2025-05-16 00:49:56 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-16 09:43:10 -0700 |
| commit | d2956385a9319155928e2d7bc5f9d90eeac5d0a5 (patch) | |
| tree | 22ee5f9857db5ffdc46039d1277d16bb96015438 /packfile.c | |
| parent | 4ae0e9423c95c63c17f66fb2de255c46dc14c4e5 (diff) | |
| download | git-d2956385a9319155928e2d7bc5f9d90eeac5d0a5.tar.xz | |
oid_object_info(): drop type_name strbuf
We provide a mechanism for callers to get the object type as a raw
string, rather than an object_type enum. This was in theory useful for
returning types that are not representable in the enum, but we consider
any such type to be an error, and there are no callers that use the
strbuf anymore.
Let's drop support to simplify the code a bit.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
| -rw-r--r-- | packfile.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/packfile.c b/packfile.c index d91016f1c7..80e35f1032 100644 --- a/packfile.c +++ b/packfile.c @@ -1598,17 +1598,12 @@ int packed_object_info(struct repository *r, struct packed_git *p, *oi->disk_sizep = pack_pos_to_offset(p, pos + 1) - obj_offset; } - if (oi->typep || oi->type_name) { + if (oi->typep) { enum object_type ptot; ptot = packed_to_object_type(r, p, obj_offset, type, &w_curs, curpos); if (oi->typep) *oi->typep = ptot; - if (oi->type_name) { - const char *tn = type_name(ptot); - if (tn) - strbuf_addstr(oi->type_name, tn); - } if (ptot < 0) { type = OBJ_BAD; goto out; |
