Skip to content

Commit

Permalink
fix(previewers): limit git log entries to prevent fork bomb
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jamestrew committed Sep 11, 2024
1 parent 5972437 commit 3e2c92f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ previewers.git_branch_log = defaulter(function(opts)
"--no-pager",
"log",
"--graph",
"--max-count=1000", -- prevent fork bombing with large repos
"--pretty=format:%h -%d %s (%cr)",
"--abbrev-commit",
"--date=relative",
Expand Down

0 comments on commit 3e2c92f

Please sign in to comment.