From bebe60850566c603eb37659daf89b853ffdc9f63 Mon Sep 17 00:00:00 2001 From: Gareth Date: Tue, 10 Mar 2026 22:13:56 -0700 Subject: [PATCH] fix: increase bufio's max buffer size to handle large json lines for big repos --- pkg/restic/outputs.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/restic/outputs.go b/pkg/restic/outputs.go index a2cea229..22370dc2 100644 --- a/pkg/restic/outputs.go +++ b/pkg/restic/outputs.go @@ -207,6 +207,8 @@ func processProgressOutput[T ProgressEntryValidator]( callback func(T)) (T, error) { scanner := bufio.NewScanner(output) + // increase the buffer size to handle large JSON lines. + scanner.Buffer(make([]byte, 0, 64*1024), 10*1024*1024) scanner.Split(bufio.ScanLines) nonJSONOutput := &errorMessageCollector{}