From e53c2f32c547de322cbd9bbfde8243f1d7998d9c Mon Sep 17 00:00:00 2001 From: LiuLiu Date: Mon, 12 Aug 2024 09:15:24 -0700 Subject: [PATCH] string fix --- go/cmd/dolt/commands/log_graph.go | 2 +- integration-tests/bats/log.bats | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go/cmd/dolt/commands/log_graph.go b/go/cmd/dolt/commands/log_graph.go index d2c8fbc7ba8..e99c8ed73b6 100644 --- a/go/cmd/dolt/commands/log_graph.go +++ b/go/cmd/dolt/commands/log_graph.go @@ -436,7 +436,7 @@ func printGraphAndCommitsInfo(graph [][]string, pager *outputpager.Pager, apr *a last_commit_row := commits[len(commits)-1].Row printCommitMetadata(graph, pager, last_commit_row, len(graph[last_commit_row]), commits[len(commits)-1], decoration) for _, line := range commits[len(commits)-1].formattedMessage { - pager.Writer.Write([]byte(color.WhiteString("\t", line))) + pager.Writer.Write([]byte(color.WhiteString("\t%s", line))) pager.Writer.Write([]byte("\n")) } } diff --git a/integration-tests/bats/log.bats b/integration-tests/bats/log.bats index f5a1b878b06..245f70d1ad7 100755 --- a/integration-tests/bats/log.bats +++ b/integration-tests/bats/log.bats @@ -844,10 +844,11 @@ export NO_COLOR=1 [[ "${lines[7]}" =~ "Author:" ]] || false # Author: [[ "${lines[8]}" =~ "Date:" ]] || false # Date: [[ "${lines[9]}" =~ "Initialize data repository" ]] || false # Initialize data repository + [[ ! "${lines[9]}" =~ "%!(EXTRA string=" ]] || false run dolt log --graph --oneline [ "$status" -eq 0 ] - + [[ "${lines[0]}" =~ \* ]] || false [[ ! "$output" =~ "Author" ]] || false [[ ! "$output" =~ "Date" ]] || false