fix(previewers): limit git log entries to prevent fork bomb (#3287)

Adds `--max-count=1000` flag to the `git log` command in the
`git_branch_log` previewer. This prevents potential fork bombing
issues with large repositories.
This commit is contained in:
James Trew
2024-09-11 00:11:39 +00:00
committed by GitHub
parent 5972437de8
commit fe999db6e0

View File

@@ -802,6 +802,7 @@ previewers.git_branch_log = defaulter(function(opts)
"--no-pager", "--no-pager",
"log", "log",
"--graph", "--graph",
"--max-count=1000", -- prevent fork bombing with large repos
"--pretty=format:%h -%d %s (%cr)", "--pretty=format:%h -%d %s (%cr)",
"--abbrev-commit", "--abbrev-commit",
"--date=relative", "--date=relative",