Closed anihm136 closed 3 years ago
Would you make a repro? Do you mean following situation?
mkdir foo && cd foo
mkdir bar && cd bar && git init .
touch a && git add a && git commit -m test
cd ..
ln -s b ./foo/a
vim b
Okay, sorry to file without exploring fully. The minimal case works fine. Here is the specific case that I'm having issues with - Directory structure is as follows -
A.txt -> symlink to a file in a repo
B/ -> symlink to a directory in a repo
C.txt -> file inside B (inside the repo)
Now, it works fine when
nvim B/C.txt
cd B && nvim ../A.txt
However, the following cases don't work -nvim A.txt
- does not detect A.txt as a version controlled file:edit B/C.txt
- does not detect C.txt as a version controlled file
This is probably a very niche case, and maybe not recommended by git itself (this is basically how I have all my dotfiles set up). Let me know if I can share any more infoAlso worth noting that I am using neovim, not vim
This is not an issue because symlinks outside repository are not handled as files in the repository by Git.
$ mkdir foo && cd foo
$ git init .
$ touch A
$ cd ..
$ ln -s ./foo/A B
$ git add B
fatal: not a git repository (or any of the parent directories): .git
Symlink is not resolved automatically. The linked file is treated as if it is put in the same directory where the symlink is put in. This behavior seems standard in many other CLI tools; they don't resolve symlinks. git-messenger.vim also should follow this behavior, I think.
Hi! I've been using this plugin for a few months now, and today I noticed that it does not detect a symlinked folder that is inside a git directory. That is, if the original directory/file is in a git repo, and I am accessing the symlink through vim, it does not detect the repo. WOuld it be possible to add this enhancement?