-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix opening repos when .git
is a soft link
#21153
Fix opening repos when .git
is a soft link
#21153
Conversation
.git
is soft link.git
is a soft link
@cla-bot check |
@maxbrunsfeld can you help me review this change? |
9ca1803
to
06dccc5
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: CanWang.
|
06dccc5
to
0f1c680
Compare
edb9813
to
21bcfdc
Compare
21bcfdc
to
0fdc8c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment documenting why we use the parent directory here, including a link to the libgit2 documentation:
https://libgit2.org/docs/reference/main/repository/git_repository_open.html
comment added |
Thank you! |
Closes #ISSUE
background
If a project is big, some times it will be splited into many small git repos.
google repo is a tool to manage a group of git repos.
But, any small git repo manged by this tool, have a difference with normal git repo.
That is , the path
.git
in the root of the git repo, is not a normal directory, but a soft link to real git bare dir.zed can not recognize the
git-repo
managed git reposyou can use the procedure to genreate this problem
with vscode, after opening this project, git works well.
but for Zed, git not work(not git status, no git blame)
how to fix
libgit2 can recognize git repo from the root of the project(dir that have
.git
).so, we can recognize the git project by opening from the project root dir, but not the
.git
dirThis fix also works with normal git project.
before fix
after fix
Release Notes: