diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-08-21 18:51:46 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-21 12:43:05 -0700 |
commit | fc7e73d7ef3bd987716b9f3ece57d2d15d631bc2 (patch) | |
tree | 422529c74cae33cff876a3e899221f7078737db2 /diff-lib.c | |
parent | Seventh batch (diff) | |
download | tgif-fc7e73d7ef3bd987716b9f3ece57d2d15d631bc2.tar.xz |
t4013: improve diff-post-processor logic
From 72f936b1 (t4013: make test hash independent, 2020-02-07),
we started to adjust metadata of git-diff's output in order to
ignore uninteresting metadata which is dependent of underlying hash
algorithm.
However, we forgot to special case all-zero object names, which is
special for missing objects, in consequence, we could't catch
possible future bugs where object names is all-zeros including but
not limited to:
* show intend-to-add entry
* deleted entry
* diff between index and working tree with new file
We also mistakenly munged file-modes as if they were object names
abbreviated to 6 hexadecimal digits.
In addition, in the upcoming change, we would like to test for
customizing the length of abbreviated blob objects on the index line,
which is not supported by current diff-processor logic.
Let's fix the bug for all-zero object names, and file modes.
While we're at it, support abbreviation of object names up to 16 bytes.
Based-on-patch-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
0 files changed, 0 insertions, 0 deletions