]> git.ipfire.org Git - thirdparty/git.git/commit
userdiff.c: use designated initializers for "struct userdiff_driver"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 24 Feb 2022 09:33:03 +0000 (10:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Feb 2022 23:59:27 +0000 (15:59 -0800)
commit2dd75f123d959f185404451ce89c5158debde0bd
treea9e55f762e18e1cd0c26ceb797e95946ae5cb9ba
parent4fbedd4dc0845d5aa5b56cefc7d0ac23602c210d
userdiff.c: use designated initializers for "struct userdiff_driver"

Change the "struct userdiff_driver" assignmentns to use designated
initializers, but let's keep the PATTERNS() and IPATTERN() convenience
macros to avoid churn, but have them defined in terms of designated
initializers.

For the "driver_true" and "driver_false" let's have the compiler
implicitly initialize most of the fields, but let's leave a redundant
".binary = 0" for "driver_true" to make it obvious that it's the
opposite of the the ".binary = 1" for "driver_false".

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