From 31aae8a305b4c4d5b2122050641728d3cafd6a37 Mon Sep 17 00:00:00 2001 From: Lucien Davison Date: Fri, 14 Apr 2023 02:55:54 -0600 Subject: [PATCH] fix: do not truncate raw files (#4) --- internal/git/output_parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/git/output_parser.go b/internal/git/output_parser.go index e0ca7b7..3d51927 100644 --- a/internal/git/output_parser.go +++ b/internal/git/output_parser.go @@ -46,7 +46,7 @@ func truncateCommandOutput(out io.Reader, maxBytes int64) (string, bool, error) if err != nil { return "", false, err } - truncated := len(buf) >= int(maxBytes) + truncated := maxBytes > 0 && len(buf) >= int(maxBytes) // Remove the last line if it's truncated if truncated { // Find the index of the last newline character