diff: use add_diff_options() in diff_opt_parse()
commit6c6048fa7f1cf7b9ae79beb0f57fd03dd4021bb4
authorRené Scharfe <l.s.r@web.de>
Thu, 1 Dec 2022 22:51:21 +0000 (1 23:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Dec 2022 23:25:29 +0000 (2 08:25 +0900)
treeff3c1d6a7f9ca68a70219b2674585fad081b75c7
parentc5630c4868c74aab2fc4e8a4ef4bfc9c51534e0e
diff: use add_diff_options() in diff_opt_parse()

Prepare the removal of the parseopts member of struct diff_options by
using the API function add_diff_options() instead of accessing it
directly to get the command line option definitions.  Building the copy
by concatenating with an empty option array is slightly awkward, but
simpler than a non-concat version of add_diff_options() would be to use
in places that need concatenation.

Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c