diff --git a/modules/git/blame.go b/modules/git/blame.go index 9aa77dc65b131..ed7156d38d029 100644 --- a/modules/git/blame.go +++ b/modules/git/blame.go @@ -122,6 +122,8 @@ func createBlameReader(ctx context.Context, dir string, command ...string) (*Bla pid := process.GetManager().Add(fmt.Sprintf("GetBlame [repo_path: %s]", dir), cancel) scanner := bufio.NewScanner(stdout) + buf := make([]byte, 0, bufio.MaxScanTokenSize) + scanner.Buffer(buf, 1024*1024) return &BlameReader{ cmd,