Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/headhunter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ local function get_conflicts()
local conflicts_list = {}
local files = {}

local handle = io.popen("git ls-files 2>nul")
local handle = io.popen("git ls-files 2>/dev/null")
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix uses /dev/null which is Unix-specific and won't work on Windows. Consider using a cross-platform solution like 2>nul on Windows and 2>/dev/null on Unix, or check if the git command supports --quiet flag to suppress errors.

Suggested change
local handle = io.popen("git ls-files 2>/dev/null")
local dir_sep = package.config:sub(1,1)
local null_redir = (dir_sep == '\\') and "2>nul" or "2>/dev/null"
local handle = io.popen("git ls-files " .. null_redir)

Copilot uses AI. Check for mistakes.
if handle then
local output = handle:read("*a")
handle:close()
Expand Down