aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-29 12:22:02 -0700
committerJunio C Hamano <gitster@pobox.com>2022-03-29 12:22:02 -0700
commit3d8046a820851621b8f195078fcac5b5c38fec86 (patch)
tree41af42e4a44d1b3210c6af15377f549d31d62423 /object-file.c
parentThe 15th batch (diff)
parentrefs debug: add a wrapper for "read_symbolic_ref" (diff)
downloadgit-3d8046a820851621b8f195078fcac5b5c38fec86.tar.gz
git-3d8046a820851621b8f195078fcac5b5c38fec86.zip
Merge branch 'ab/refs-various-fixes'
Code clean-up. * ab/refs-various-fixes: refs debug: add a wrapper for "read_symbolic_ref" packed-backend: remove stub BUG(...) functions misc *.c: use designated initializers for struct assignments refs: use designated initializers for "struct ref_iterator_vtable" refs: use designated initializers for "struct ref_storage_be"
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/object-file.c b/object-file.c
index 62ebe236c9..b254bc50d7 100644
--- a/object-file.c
+++ b/object-file.c
@@ -274,10 +274,11 @@ static struct cached_object {
static int cached_object_nr, cached_object_alloc;
static struct cached_object empty_tree = {
- { EMPTY_TREE_SHA1_BIN_LITERAL },
- OBJ_TREE,
- "",
- 0
+ .oid = {
+ .hash = EMPTY_TREE_SHA1_BIN_LITERAL,
+ },
+ .type = OBJ_TREE,
+ .buf = "",
};
static struct cached_object *find_cached_object(const struct object_id *oid)