diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-04-15 11:38:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-04-15 08:24:36 -0700 |
commit | 70c0f9db4e00586e4df5cca24fe7ce05848ee59c (patch) | |
tree | 54480f65c224dbe45dd0d35bbecbbfd07eac6044 /cache-tree.c | |
parent | d9f517d051d1008178cb6c809b5f906d0905508f (diff) |
object-file: split up concerns of `HASH_*` flags
The functions `hash_object_file()`, `write_object_file()` and
`index_fd()` reuse the same set of flags to alter their behaviour. This
not only adds confusion, but given that every function only supports a
subset of the flags it becomes very hard to see which flags can be
passed to what function. Last but not least, this entangles the
implementation of all three function families.
Split up concerns by creating separate flags for each of the function
families.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c index bcbcad3d61..4c8167ea92 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -452,7 +452,7 @@ static int update_one(struct cache_tree *it, OBJ_TREE, &it->oid); } else if (write_object_file_flags(buffer.buf, buffer.len, OBJ_TREE, &it->oid, NULL, flags & WRITE_TREE_SILENT - ? HASH_SILENT : 0)) { + ? WRITE_OBJECT_FILE_SILENT : 0)) { strbuf_release(&buffer); return -1; } |