summaryrefslogtreecommitdiff
path: root/t/t4215-log-skewed-merges.sh
diff options
context:
space:
mode:
authorAbhishek Kumar <abhishekkumar8222@gmail.com>2020-02-24 13:38:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-24 21:11:50 (GMT)
commit989eea958bb3a334c73abcfffb9aa3ec3ed56766 (patch)
tree23f00c9f6d8a88952c955e97bbae7509aa15c6c7 /t/t4215-log-skewed-merges.sh
parent51ebf55b9309824346a6589c9f3b130c6f371b8f (diff)
downloadgit-989eea958bb3a334c73abcfffb9aa3ec3ed56766.zip
git-989eea958bb3a334c73abcfffb9aa3ec3ed56766.tar.gz
git-989eea958bb3a334c73abcfffb9aa3ec3ed56766.tar.bz2
lib-log-graph: consolidate test_cmp_graph logic
Log graph comparision logic is duplicated many times in: - t3430-rebase-merges.sh - t4202-log.sh - t4214-log-graph-octopus.sh - t4215-log-skewed-merges.sh Consolidate the core of the comparision and sanitization logic in lib-log-graph, and use it to replace the existing tests. While at it, lose the singular/plural transition magic from the sanitize_output helper, which was necessary around 7f814632 ("Use correct grammar in diffstat summary line", 2012-02-01), that has long outlived its usefulness. Signed-off-by: Abhishek Kumar <abhishekkumar8222@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4215-log-skewed-merges.sh')
-rwxr-xr-xt/t4215-log-skewed-merges.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t4215-log-skewed-merges.sh b/t/t4215-log-skewed-merges.sh
index 1d0d324..e1e9417 100755
--- a/t/t4215-log-skewed-merges.sh
+++ b/t/t4215-log-skewed-merges.sh
@@ -3,12 +3,11 @@
test_description='git log --graph of skewed merges'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-log-graph.sh
check_graph () {
cat >expect &&
- git log --graph --pretty=tformat:%s "$@" >actual.raw &&
- sed "s/ *$//" actual.raw >actual &&
- test_cmp expect actual
+ lib_test_cmp_graph --format=%s "$@"
}
test_expect_success 'log --graph with merge fusing with its left and right neighbors' '