diff: teach diff to display submodule difference with an inline diff

Teach git-diff and friends a new format for displaying the difference
of a submodule. The new format is an inline diff of the contents of the
submodule between the commit range of the update. This allows the user
to see the actual code change caused by a submodule update.

Add tests for the new format and option.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jacob Keller
2016-08-31 16:27:25 -07:00
committed by Junio C Hamano
parent 8e6df65015
commit fd47ae6a5b
7 changed files with 863 additions and 21 deletions

3
diff.h
View File

@ -111,7 +111,8 @@ enum diff_words_type {
enum diff_submodule_format {
DIFF_SUBMODULE_SHORT = 0,
DIFF_SUBMODULE_LOG
DIFF_SUBMODULE_LOG,
DIFF_SUBMODULE_INLINE_DIFF
};
struct diff_options {