diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2019-07-11 17:08:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-11 14:29:27 -0700 |
commit | b66885a30cb84fc61986bc4eea805a31fdbea79a (patch) | |
tree | 6c1194f1200b9d363752115aa6a091fdc05bbe86 /sha1-array.c | |
parent | range-diff: suppress line count in outer diff (diff) | |
download | tgif-b66885a30cb84fc61986bc4eea805a31fdbea79a.tar.xz |
range-diff: add section header instead of diff header
Currently range-diff keeps the diff header of the inner diff
intact (apart from stripping lines starting with index). This diff
header is somewhat useful, especially when files get different
names in different ranges.
However there is no real need to keep the whole diff header for that.
The main reason we currently do that is probably because it is easy to
do.
Introduce a new range diff hunk header, that's enclosed by "##",
similar to how line numbers in diff hunks are enclosed by "@@", and
give human readable information of what exactly happened to the file,
including the file name.
This improves the readability of the range-diff by giving more concise
information to the users. For example if a file was renamed in one
iteration, but not in another, the diff of the headers would be quite
noisy. However the diff of a single line is concise and should be
easier to understand.
Additionally, this allows us to add these range diff section headers to
the outer diffs hunk headers using a custom userdiff pattern, which
should help making the range-diff more readable.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-array.c')
0 files changed, 0 insertions, 0 deletions