]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff: export diffstat interface
authorDaniel Ferreira <bnmvco@gmail.com>
Wed, 13 Nov 2019 12:40:58 +0000 (12:40 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Nov 2019 02:10:04 +0000 (11:10 +0900)
commite4cb659ebdd7c21976f9088226cbcc96acaa1dff
treea32386e21485a6ced3c2475748eabb6f207d4cc7
parentf83dff60a7880f1abfc3dc3c6b8e2972c4889da5
diff: export diffstat interface

Make the diffstat interface (namely, the diffstat_t struct and
compute_diffstat) no longer be internal to diff.c and allow it to be used
by other parts of git.

This is helpful for code that may want to easily extract information
from files using the diff machinery, while flushing it differently from
how the show_* functions used by diff_flush() do it. One example is the
builtin implementation of git-add--interactive's status.

Signed-off-by: Daniel Ferreira <bnmvco@gmail.com>
Signed-off-by: Slavica Đukić <slawica92@hotmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diff.h