Closed ktsujister closed 7 months ago
Same happens for me
Cool, minor order of operations thing. I'll sort it out tonight, thanks for the report
FYI, the issue persists. Now, instead of changing the cwd
, it fails to open files correctly when clicking Enter on a staged/unstaged file while viewing Git status while not in the root cwd.
Thanks - pushed the fix. I was using the relative path here, not absolute. Lemme know if you find any other issues with the different CWD stuff. It's not a workflow I use, so I'm not going to find the edge-cases myself.
Description
I have some project that I would like to be working on subdirectory most of the time, but when I open :Neogit, cwd gets changed to repository root.
This didn't happen in
master
branch.Neovim version
NVIM v0.10.0-dev-2723+g981301d11 Build type: RelWithDebInfo LuaJIT 2.1.1710088188
Operating system and version
macOS 14, ubuntu 20.04
Steps to reproduce
nvim -nu minimal.lua +q
git -C .min/plugins/neogit pull origin nightly
:cd
to subdirectory of a project which has directory.:Neogit
Return to original file and check
cwd
:lua print(vim.fn.getcwd())
Expected behavior
cwd
should remain the same before and after opening neogit.Actual behavior
cwd
on the file gets set to repository's root.Minimal config