From 7826f88cf2bccee41e3316ab872db16e0dac62bb Mon Sep 17 00:00:00 2001 From: Danish Bhatti Date: Wed, 20 May 2026 16:22:12 +0200 Subject: [PATCH] fix(index): use item.name in checkout_unstaged instead of escaped_path escaped_path produces incorrect paths for git checkout, causing discard of the entire unstaged section to silently do nothing. item.name is consistent with the single-file discard path and the prior fix in 7728ee32. --- lua/neogit/lib/git/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/neogit/lib/git/index.lua b/lua/neogit/lib/git/index.lua index 320023480..6c4d0f100 100644 --- a/lua/neogit/lib/git/index.lua +++ b/lua/neogit/lib/git/index.lua @@ -125,7 +125,7 @@ end function M.checkout_unstaged() local items = util.map(git.repo.state.unstaged.items, function(item) - return item.escaped_path + return item.name end) return git.cli.checkout.files(unpack(items)).call { await = true }