range-diff: let '--abbrev' option takes effect
commit2b15969f61425afb2f1e67aa48ea73d2f10d8eb9
authorTeng Long <dyroneteng@gmail.com>
Mon, 20 Feb 2023 14:24:44 +0000 (20 22:24 +0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2023 22:02:05 +0000 (21 14:02 -0800)
tree2ea4eabd5bd0a66de4968c3d4a4dfa81d6e2c374
parentd9d677b2d8cc5f70499db04e633ba7a400f64cbf
range-diff: let '--abbrev' option takes effect

As mentioned in 'git-range-diff.txt': "`git range-diff` also accepts the
regular diff options (see linkgit:git-diff[1])...", but '--abbrev' is not
in the "regular" scope.

In Git, the "abbrev" of an object may not be a fixed value in different
repositories, depending on the needs of the them(Linus mentioned in
e6c587c7 in 2016: "the Linux kernel project needs 11 to 12 hexdigits"
at that time ), that's why a user may want to display abbrev according
to a specified length.

Although a similar effect can be achieved through configuration (like:
git -c core.abbrev=<abbrev>), but based on ease of use (many users may not
know that the -c option can be specified) and the description in existing
document, supporting users to directly use '--abbrev', could be a good way.

Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
range-diff.c
t/t3206-range-diff.sh