Skip to content

Commit f129906

Browse files
Mauritz8chrisgrieser
authored andcommitted
fix: parse filepath that contains b/
1 parent 59b9a75 commit f129906

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/tinygit/commands/stage.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ local function getHunksFromDiffOutput(diffCmdStdout, diffIsOfStaged)
6565
local diffLines = vim.split(file, "\n")
6666
local changesInFile, diffHeaderLines, fileMode, _ = splitOffDiffHeader(diffLines)
6767
local diffHeader = table.concat(diffHeaderLines, "\n")
68-
local relPath = diffHeaderLines[1]:match("b/(.+)")
68+
local relPath = diffHeaderLines[1]:match("a/.+ b/(.+)")
6969
assert(relPath, "Failed to parse diff header:\n" .. table.concat(diffHeaderLines, "\n"))
7070
local absPath = gitroot .. "/" .. relPath
7171

0 commit comments

Comments
 (0)