Subject: Re: [PATCH 04/10] object-file API: have write_object_file() take "enum object_type"

From: Junio C Hamano <[email-masked]>
Date: Tue, 01 Feb 2022 10:58:56 -0800

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

> Change the write_object_file() function to take an "enum object_type"
> instead of a "const char *type". Its callers either passed
> {commit,tree,blob,tag}_type and can pass the corresponding OBJ_* type
> instead, or were hardcoding strings like "blob".
>
> This avoids the back & forth fragility where the callers of
> write_object_file() would have the enum type, and convert it
> themselves via type_name(). We do have to now do that conversion
> ourselves before calling write_object_file_prepare(), but those
> codepaths will be similarly adjusted in subsequent commits.

Up to this point, the series makes sense to me (I didn't check for
calls that were left uncoverted by mistake, or new callers that were
added on other topics---the compiler should flag them all).