Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Find a file
Wang Can e0cbbf8d06
Fix opening repos when .git is a soft link (#21153)
Closes #ISSUE

## background
If a project is big, some times it will be splited into many small git
repos.
[google repo](https://gerrit.googlesource.com/git-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 repos
you can use the procedure to genreate this problem
```bash
# tested on linux
mkdir -p bad_git_repo_project
cd bad_git_repo_project
git init
echo "hello" > hi.txt
git add .
git commit -m "init commit"
echo "hello world" >> hi.txt

# modify the repo
mv .git ../.real_git_repo
ln -sf ../.real_git_repo .git
```
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` dir

This fix also works with normal git project.

### before fix

![image](https://github.com/user-attachments/assets/1fb53ff4-4ab1-402e-9640-608ca79e12a4)


### after fix

![image](https://github.com/user-attachments/assets/6b16bc54-34f0-4436-b642-3c5fa8b669bd)

Release Notes:
- Fix opening repos when .git is a soft link
2024-12-12 18:29:37 -08:00
.cargo Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
.cloudflare docs: Document context servers (#21170) 2024-11-25 11:05:14 -05:00
.config
.github Update GitHub bug issue template to refer to bugs instead of features (#21727) 2024-12-12 16:54:37 -08:00
.zed ci: Move collab to Dockerfile-collab (#18515) 2024-09-30 16:14:26 -04:00
assets editor: Add debounce setting for triggering DocumentHighlight (#21702) 2024-12-12 15:37:58 -08:00
crates Fix opening repos when .git is a soft link (#21153) 2024-12-12 18:29:37 -08:00
docs editor: Add debounce setting for triggering DocumentHighlight (#21702) 2024-12-12 15:37:58 -08:00
extensions elixir: Improve ElixirLS LSP autocomplete to show labelDetails information (#21666) 2024-12-12 16:16:23 -08:00
legal Stop sending data to Clickhouse (#21763) 2024-12-10 08:47:29 -07:00
nix nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
script Add musl package for Arch Linux (#21830) 2024-12-10 21:05:53 -05:00
tooling/xtask chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
.git-blame-ignore-revs
.gitattributes
.gitignore nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
.mailmap Update .mailmap (#20729) 2024-11-15 11:05:41 -05:00
Cargo.lock elixir: Improve ElixirLS LSP autocomplete to show labelDetails information (#21666) 2024-12-12 16:16:23 -08:00
Cargo.toml Add placeholder git panel (#21894) 2024-12-11 22:13:52 -05:00
clippy.toml chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
CODE_OF_CONDUCT.md Remove community content from docs and point to zed.dev (#19895) 2024-10-29 09:44:58 -04:00
compose.yml
CONTRIBUTING.md Remove community content from docs and point to zed.dev (#19895) 2024-10-29 09:44:58 -04:00
Cross.toml Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
debug.plist
default.nix
docker-compose.sql
Dockerfile-collab collab: Remove dependency on X11 (#19079) 2024-10-11 13:28:34 -04:00
Dockerfile-collab.dockerignore ci: Move collab to Dockerfile-collab (#18515) 2024-09-30 16:14:26 -04:00
Dockerfile-cross Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
Dockerfile-cross.dockerignore Add remote server cross compilation (#19136) 2024-10-12 23:23:56 -07:00
Dockerfile-distros Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
Dockerfile-distros.dockerignore Support More Linux (#18480) 2024-09-30 17:46:21 -04:00
flake.lock nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
flake.nix nix: Return to building with crane (#21292) 2024-11-29 10:09:33 +01:00
LICENSE-AGPL
LICENSE-APACHE
LICENSE-GPL
livekit.yaml
Procfile
Procfile.postgrest
README.md Format READMEs (#17454) 2024-09-05 15:39:16 -04:00
renovate.json Migrate Renovate config (#20741) 2024-11-15 14:37:39 -05:00
rust-toolchain.toml chore: Bump Rust to 1.81 (#17440) 2024-09-06 00:40:44 +02:00
shell.nix
typos.toml Stop sending data to Clickhouse (#21763) 2024-12-10 08:47:29 -07:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

Packaging status

On macOS and Linux you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.