[PATCH v2 7/8] object.c: normalize brace style in object_as_type()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 20, 2021, 13:36 UTC
- Message-ID
- <patch-7.8-893b178573-20210420T133218Z-avarab@gmail.com>
- In-Reply-To
- <cover-0.8-0000000000-20210420T133218Z-avarab@gmail.com>
Normalize the brace style in this function introduced in 8ff226a9d5e (add object_as_type helper for casting objects, 2014-07-13) to be in line with the coding style of the project.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- object.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/object.c b/object.c index 0f07f976fb..f694db7e87 100644 --- a/object.c +++ b/object.c @@ -190,16 +190,15 @@ char* oid_is_type_or_die_msg(const struct object_id *oid, void *object_as_type(struct object *obj, enum object_type type, int quiet) { - if (obj->type == type) + if (obj->type == type) { return obj; - else if (obj->type == OBJ_NONE) { + } else if (obj->type == OBJ_NONE) { if (type == OBJ_COMMIT) init_commit_node((struct commit *) obj); else obj->type = type; return obj; - } - else { + } else { if (!quiet) error(_(object_type_mismatch_msg), oid_to_hex(&obj->oid),
-- 2.31.1.723.ga5d7868e4a