Closed DavidGamba closed 2 months ago
git ls-files
can be given the path of any file to determine if the source is tracked in git. Combined with --error-unmatch
you can just check for the exit code.
$ git ls-files --error-unmatch a
a/a.txt
$ git ls-files --error-unmatch b
error: pathspec 'b' did not match any file(s) known to git
Did you forget to 'git add'?
Did you check the docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev-2976+g208852126
Operating system/version
MacOS 14.4.1
Describe the bug
What is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
mkdir a b c
within a git repo.touch a.txt
MOVE b/ -> c/b/
. Click OK:git add a/a.txt
Expected Behavior
Move operations of files not tracked by git should work.
Directory structure
a/a.txt b/ c/
Repro
Did you check the bug with a clean config?
nvim -u repro.lua
using the repro.lua file above.