]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refspec.c: use designated initializers for "struct refspec_item"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 24 Feb 2022 09:33:05 +0000 (10:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Feb 2022 23:59:53 +0000 (15:59 -0800)
Change the "struct refspec_item" at the top of refspec.c to use
designated initializers. Let's keep the "= 0" assignments for
self-documentation purposes, even though they're now redundant.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refspec.c

index e3d852c0bfeca6bd5d166e5c8041d8176eae3a11..63e3112104a949e28e0cae1c8beaee0c27c099f1 100644 (file)
--- a/refspec.c
+++ b/refspec.c
@@ -4,13 +4,13 @@
 #include "refspec.h"
 
 static struct refspec_item s_tag_refspec = {
-       0,
-       1,
-       0,
-       0,
-       0,
-       "refs/tags/*",
-       "refs/tags/*"
+       .force = 0,
+       .pattern = 1,
+       .matching = 0,
+       .exact_sha1 = 0,
+       .negative = 0,
+       .src = "refs/tags/*",
+       .dst = "refs/tags/*",
 };
 
 /* See TAG_REFSPEC for the string version */