diff: factor out add_diff_options()
commitc5630c4868c74aab2fc4e8a4ef4bfc9c51534e0e
authorRené Scharfe <l.s.r@web.de>
Thu, 1 Dec 2022 22:49:11 +0000 (1 23:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Dec 2022 23:25:29 +0000 (2 08:25 +0900)
tree2cbb3d66b9213eb800acbf816a67a6861e73517a
parente7e5c6f715b2de7bea0d39c7d2ba887335b40aa0
diff: factor out add_diff_options()

Add a function for appending the parseopts member of struct diff_options
to a struct option array.  Use it in two sites instead of accessing the
parseopts member directly.  Decoupling callers from diff internals like
that allows us to change the latter.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/range-diff.c
diff-no-index.c
diff.c
diff.h