range-diff: move the diffopt initialization down one layer
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 5 Feb 2021 14:46:12 +0000 (14:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 7 Feb 2021 05:14:31 +0000 (21:14 -0800)
commit3e6046edadf409537cc9e991d1df628fa96953ba
treeb87fd2963f2276ef1d3da9457ddf138588f601bf
parentf1ce6c191e9d15ce78041d8b6496c246b10d9b2d
range-diff: move the diffopt initialization down one layer

It is actually only the `output()` function that uses those diffopts. By
moving the diffopt initialization down into that function, it is
encapsulated better.

Incidentally, it will also make it easier to implement the `--left-only`
and `--right-only` options in `git range-diff` because the `output()`
function is now receiving all range-diff options as a parameter, not
just the diffopts.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
range-diff.c