Skip to content

Commit c8302c6

Browse files
aerussogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 71ca53e commit c8302c6

File tree

1 file changed

+167
-187
lines changed

1 file changed

+167
-187
lines changed

0 commit comments

Comments
 (0)