Skip to content

Commit 91c88eb

Browse files
committed
SQUASH???
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b9ca46 commit 91c88eb

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

t/lib-log-graph.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Helpers shared by the test scripts for comparing log graphs.
22

3-
sanitize_output() {
3+
sanitize_output () {
4+
# Versions of Git that predate 7f814632 ("Use correct grammar
5+
# in diffstat summary line", 2012-02-01) did not correctly use
6+
# singular when one path was involved, and a handful of rules
7+
# were added to work with both older and newer versions of Git
8+
# back then. These are probably not relevant anymore, and
9+
# we'd want to lose them someday...
410
sed -e 's/ *$//' \
511
-e 's/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/' \
612
-e 's/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/' \
@@ -15,25 +21,25 @@ sanitize_output() {
1521
}
1622

1723
# Assume expected graph is in file `expect`
18-
test_cmp_graph_file() {
24+
test_cmp_graph_file () {
1925
git log --graph "$@" >output &&
20-
sanitize_output >output.trimmed <output &&
21-
test_i18ncmp expect output.trimmed
26+
sanitize_output >output.sanitized <output &&
27+
test_i18ncmp expect output.sanitized
2228
}
2329

24-
test_cmp_graph() {
30+
test_cmp_graph () {
2531
cat >expect &&
2632
test_cmp_graph_file "$@"
2733
}
2834

2935
# Assume expected graph is in file `expect.colors`
30-
test_cmp_colored_graph_file() {
36+
test_cmp_colored_graph_file () {
3137
git log --graph --color=always "$@" >output.colors.raw &&
3238
test_decode_color <output.colors.raw | sed "s/ *\$//" >output.colors &&
3339
test_cmp expect.colors output.colors
3440
}
3541

36-
test_cmp_colored_graph() {
42+
test_cmp_colored_graph () {
3743
cat >expect.colors &&
3844
test_cmp_colored_graph_file "$@"
3945
}

0 commit comments

Comments
 (0)