diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2020-05-11 13:56:16 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-11 18:33:56 +0200 |
commit | 48da94ba374e0dca8d3a70c617060d94ce242c78 (patch) | |
tree | c2747a3de6708b9e238b30970522d9d17a69b5d4 /git-gui | |
parent | line-log: remove unused fields from 'struct line_log_data' (diff) | |
download | git-48da94ba374e0dca8d3a70c617060d94ce242c78.tar.xz git-48da94ba374e0dca8d3a70c617060d94ce242c78.zip |
t4211-line-log: add tests for parent oids
None of the tests in 't4211-line-log.sh' really check which parent
object IDs are shown in the output, either implicitly as part of
"Merge: ..." lines [1] or explicitly via the '%p' or '%P' format
specifiers in a custom pretty format.
Add two tests to 't4211-line-log.sh' to check which parent object IDs
are shown, one without and one with explicitly requested parent
rewriting, IOW without and with the '--parents' option.
The test without '--parents' is marked as failing, because without
that option parent rewriting should not be performed, and thus the
parent object ID should be that of the immediate parent, just like in
case of a pathspec-limited history traversal without parent rewriting.
The current line-level log implementation, however, performs parent
rewriting unconditionally and without a possibility to turn it off,
and, consequently, it shows the object ID of the most recent ancestor
that modified the given line range.
In both of these new tests we only really care about the object IDs of
the listed commits and their parents, but not the diffs of the line
ranges; the diffs have already been thoroughly checked in the previous
tests.
[1] While one of the tests ('-M -L ':f:b.c' parallel-change') does
list a merge commit, both of its parents happen to modify the
given line range and are listed as well, so the implications of
parent rewriting remained hidden and untested.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui')
0 files changed, 0 insertions, 0 deletions