Thread (1 message) 1 message, 1 author, 2022-02-01

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

From: Junio C Hamano <hidden>
Date: 2022-02-01 18:59:04

Ævar Arnfjörð Bjarmason  [off-list ref] 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).

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help