From 3e2c92fad934756bb68d45550ea6c4230e5687db Mon Sep 17 00:00:00 2001 From: James Trew Date: Tue, 10 Sep 2024 20:06:29 -0400 Subject: [PATCH] fix(previewers): limit git log entries to prevent fork bomb 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. --- lua/telescope/previewers/buffer_previewer.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/telescope/previewers/buffer_previewer.lua b/lua/telescope/previewers/buffer_previewer.lua index 18f483df18..d0756ff69e 100644 --- a/lua/telescope/previewers/buffer_previewer.lua +++ b/lua/telescope/previewers/buffer_previewer.lua @@ -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",