]> git.ipfire.org Git - thirdparty/git.git/commit
t6016: move to lib-log-graph.sh framework
authorAntonio Russo <aerusso@aerusso.net>
Mon, 4 Jan 2021 02:30:35 +0000 (19:30 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Jan 2021 20:20:49 +0000 (12:20 -0800)
commitc8302c6c0027fb8714106b9365f3443a2d233f44
tree6f364b5d3e3ec3839220d86b250e24c0b521df76
parent71ca53e8125e36efbda17293c50027d31681a41f
t6016: move to lib-log-graph.sh framework

t6016 manually reconstructs git log --graph output by using the reported
commit hashes from `git rev-parse`.  Each tag is converted into an
environment variable manually, and then `echo`-ed to an expected output
file, which is in turn compared to the actual output.

The expected output is difficult to read and write, because, e.g.,
each line of output must be prefaced with echo, quoted, and properly
escaped.  Additionally, the test is sensitive to trailing whitespace,
which may potentially be removed from graph log output in the future.

In order to reduce duplication, ease troubleshooting of failed tests by
improving readability, and ease the addition of more tests to this file,
port the operations to `lib-log-graph.sh`, which is already used in
several other tests, e.g., t4215.  Give all merges a simple commit
message, and use a common `check_graph` macro taking a heredoc of the
expected output which does not required extensive escaping.

Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6016-rev-list-graph-simplify-history.sh