Skip to content

Commit

Permalink
fix(#361): fix diff functionality not working when cwd does not match…
Browse files Browse the repository at this point in the history
… .git dir
  • Loading branch information
tanvirtin committed Jun 6, 2024
1 parent a33f032 commit 8caecf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/vgit/git/cli/Git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ Git.show = loop.suspend(function(self, tracked_filename, commit_hash, spec, call
'-C',
self.cwd,
'show',
string.format('%s:%s%s', commit_hash, self.cwd, tracked_filename),
string.format('%s:./%s', commit_hash, tracked_filename),
}),
on_stdout = function(line) result[#result + 1] = line end,
on_stderr = function(line) err[#err + 1] = line end,
Expand All @@ -658,7 +658,7 @@ Git.is_in_remote = loop.suspend(function(self, tracked_filename, commit_hash, sp
'-C',
self.cwd,
'show',
string.format('%s:%s%s', commit_hash, self.cwd, tracked_filename),
string.format('%s:./%s', commit_hash, tracked_filename),
}),
on_stderr = function(line)
if line then
Expand Down

0 comments on commit 8caecf0

Please sign in to comment.