Skip to content

Commit

Permalink
Merge pull request #8251 from dolthub/liuliu/color-string-fix
Browse files Browse the repository at this point in the history
liuliu/color-string-fix
  • Loading branch information
liuliu-dev authored Aug 12, 2024
2 parents 807a42b + e53c2f3 commit a7b7fde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/cmd/dolt/commands/log_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/bats/log.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7b7fde

Please sign in to comment.