From b4d477a94f9738423465013daeed7dbd774af63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauritz=20Sj=C3=B6din?= Date: Mon, 20 Apr 2026 02:14:20 +0200 Subject: [PATCH] fix: parse filepath that contains b/ --- lua/tinygit/commands/stage.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/tinygit/commands/stage.lua b/lua/tinygit/commands/stage.lua index a3b3749..b5f3a8b 100644 --- a/lua/tinygit/commands/stage.lua +++ b/lua/tinygit/commands/stage.lua @@ -65,7 +65,7 @@ local function getHunksFromDiffOutput(diffCmdStdout, diffIsOfStaged) local diffLines = vim.split(file, "\n") local changesInFile, diffHeaderLines, fileMode, _ = splitOffDiffHeader(diffLines) local diffHeader = table.concat(diffHeaderLines, "\n") - local relPath = diffHeaderLines[1]:match("b/(.+)") + local relPath = diffHeaderLines[1]:match("a/.+ b/(.+)") assert(relPath, "Failed to parse diff header:\n" .. table.concat(diffHeaderLines, "\n")) local absPath = gitroot .. "/" .. relPath