From ae24b032a04ccd1565cb1ce13317b56daa77ce7f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 16 May 2025 00:49:45 -0400 Subject: object-file: drop OBJECT_INFO_ALLOW_UNKNOWN_TYPE flag Since cat-file dropped its "--allow-unknown-type" option in the previous commit, there are no more uses of the internal flag that implemented it. Let's drop it. That in turn lets us drop the strbuf parameter of unpack_loose_header(), which now is always NULL. And without that, we can drop all of the additional code to inflate larger headers into the strbuf. Arguably we could drop ULHR_TOO_LONG, as no callers really care about the distinction from ULHR_BAD. But it's easy enough to retain, and it does let us produce a slightly more specific message in one instance. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- streaming.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'streaming.c') diff --git a/streaming.c b/streaming.c index 127d6b5d6a..6d6512e2e0 100644 --- a/streaming.c +++ b/streaming.c @@ -238,7 +238,7 @@ static int open_istream_loose(struct git_istream *st, struct repository *r, return -1; switch (unpack_loose_header(&st->z, st->u.loose.mapped, st->u.loose.mapsize, st->u.loose.hdr, - sizeof(st->u.loose.hdr), NULL)) { + sizeof(st->u.loose.hdr))) { case ULHR_OK: break; case ULHR_BAD: -- cgit v1.3