Comments (4)
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
from git-messenger.vim.
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
- I open C.txt as
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- After opening A.txt.
: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 info
from git-messenger.vim.
Also worth noting that I am using neovim, not vim
from git-messenger.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.
from git-messenger.vim.
Related Issues (20)
- Question about autocmd on float window HOT 4
- [Feature Request] View word-diff version of commit HOT 2
- Git on CentOS7 does not work because it does not support -C option HOT 5
- Inside .github directory is detected as inside .git directory
- Lines starting with '-' are highlighted as 'removed' in word diffs
- [Question] Missing tests for word-diff feature HOT 3
- Add highlight border color variable HOT 7
- [Idea] Open github pull request of commit HOT 3
- popup commit body sometimes shows CRLF ^M HOT 10
- View range log
- E21: Cannot make changes, 'modifiable' is off HOT 3
- Does not resolve symlink before searching for git root
- Doesn't work on worktrees HOT 2
- Autoclose on BufLeave should be only when entering into a normal buffer HOT 2
- Git popup in visual mode on "<"
- expose command to customise git diff
- vim support popup_create ?
- The bottom border is gone after I press r or d
- Highlight glitch if I press r followed by d
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-messenger.vim.