Closed cjgibbons closed 2 months ago
+1 When time permits. I am on Window, so important to me. Is there something holding this up @CKolkey
Good stuff! I don't have a windows installation, so I appreciate the assistance in ensuring a smooth experience with the platform :)
Thanks, awesome and appreciated.
Multiple fixes for issues are contained in this PR:
This PR fixes Issue #954 by changing:
vim.fn.system()
withplenary.job
, and then testing the return value after the job finishes.git_root_of_cwd()
withplenary.job
, testing the return value and if in error defaults tovim.fn.getcwd()
otherwise returns the directory fromgit rev-parse --show-toplevel
On Windows, the
vim.fn.system()
was returning 127, instead of the expected 0, resulting infalse
wheneveris_inside_worktree()
is invoked. In turn, this always means the prompt for initializing the git repos is displayed for every Neogit operation. Plenary.job produces a 0 on success.Similarly, the call to
git_root_of_cwd()
kept returning the empty string "" (due to the non-zero success values) sovim.fn.getcwd()
was always being called. The above change reduces the abstraction by makingopts.cwd
have either the git toplevel directory or the current working directory whenevergit_root_of_cwd()
is invoked.This PR also fixes Issue #1256:
2 R
only then the regex matches the case for renamed files AND renamed and staged files. Since the file paths are matched properly they can be edited normally.