graph: add test to demonstrate horizontal line bug
commit8588932e206a790f7c7582368f7b09daa36576e3
authorDerrick Stolee <dstolee@microsoft.com>
Wed, 8 Jan 2020 04:27:54 +0000 (8 04:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 20:14:51 +0000 (15 12:14 -0800)
tree9845ac5fc5fed5aa95423d21b48474ae0281b0e6
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783
graph: add test to demonstrate horizontal line bug

A previous test in t4215-log-skewed-merges.sh was added to demonstrate
exactly the topology of a reported failure in "git log --graph". While
investigating the fix, we realized that multiple edges that could
collapse with horizontal lines were not doing so.

Specifically, examine this section of the graph:

| | | | | | *
| |_|_|_|_|/|\
|/| | | | |/ /
| | | | |/| /
| | | |/| |/
| | |/| |/|
| |/| |/| |
| | |/| | |
| | * | | |

Document this behavior with a test. This behavior is new, as the
behavior in v2.24.1 has the following output:

| | | | | | *-.
| | | | | | |\ \
| |_|_|_|_|/ / /
|/| | | | | / /
| | |_|_|_|/ /
| |/| | | | /
| | | |_|_|/
| | |/| | |
| | * | | |

The behavior changed logically in 479db18b ("graph: smooth appearance
of collapsing edges on commit lines", 2019-10-15), but was actually
broken due to an assert() bug in 458152cc ("graph: example of graph
output that can be simplified", 2019-10-15). A future change could
modify this behavior to do the following instead:

| | | | | | *
| |_|_|_|_|/|\
|/| | | | |/ /
| | |_|_|/| /
| |/| | | |/
| | | |_|/|
| | |/| | |
| | * | | |

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4215-log-skewed-merges.sh