vgit.nvim
vgit.nvim copied to clipboard
fix: Staging fails when cwd differs from repo root
When GitFile(filename) was created with a relative path, git_repo.discover() resolved it relative to the current working directory. If the user :cd'd to a subdirectory, paths got resolved incorrectly and staging operations silently failed.
- DiffScreen: Use
self.git_fileinstead of creating new GitFile - ProjectDiffScreen: Construct absolute paths using stored reponame
- Remove redundant
filenameparams from Model methods - Remove redundant
git_repo.discover()calls (use stored reponame) - Fix extra unused arg in
git_file:unstage(filename)