Rework git log parsing and truncating (#260)

This commit is contained in:
Thomas Miceli
2024-04-27 01:49:53 +02:00
committed by GitHub
parent 6a8759e21e
commit 785d89d6ab
4 changed files with 268 additions and 109 deletions

View File

@ -24,6 +24,8 @@ var (
)
const truncateLimit = 2 << 18
const diffSize = 2 << 12
const maxFilesPerDiffCommit = 10
type RevisionNotFoundError struct{}
@ -313,7 +315,7 @@ func GetLog(user string, gist string, skip int) ([]*Commit, error) {
}
}(cmd)
return parseLog(stdout, truncateLimit), err
return parseLog(stdout, maxFilesPerDiffCommit, diffSize)
}
func CloneTmp(user string, gist string, gistTmpId string, email string, remove bool) error {