]> granicus.if.org Git - git/commit
fsck: accept an oid instead of a "struct commit" for fsck_commit()
authorJeff King <peff@peff.net>
Fri, 18 Oct 2019 05:01:48 +0000 (01:01 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Oct 2019 03:23:55 +0000 (12:23 +0900)
commit4bc81a1de89289fea4d2d7f672f5e5a80f36c908
treebf0afcc290a0e2b31399426aea65056d8f2c0829
parent5de6dd793c2d18745ff76d4975c052a1750b00af
fsck: accept an oid instead of a "struct commit" for fsck_commit()

We don't actually look at the commit struct in fsck_commit() beyond its
oid and type (which is obviously OBJ_COMMIT). Just taking an oid gives
our callers more flexibility to avoid creating or parsing a struct, and
makes it clear that we are fscking just what is in the buffer, not any
pre-parsed bits from the struct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c