zed/crates
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
..
activity_indicator language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
anthropic assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
assets add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
assistant language_model_selector: Don't recreate the Picker view each render (#21939) 2024-12-12 17:08:48 -05:00
assistant2 language_model_selector: Don't recreate the Picker view each render (#21939) 2024-12-12 17:08:48 -05:00
assistant_slash_command Overhaul extension registration (#21083) 2024-11-22 19:02:32 -05:00
assistant_tool Factor tool definitions out of assistant (#21189) 2024-11-25 18:26:34 -05:00
assistant_tools assistant2: Add support for using tools (#21190) 2024-11-25 19:44:34 -05:00
audio Update Rust crate rodio to 0.20.0 (#20955) 2024-11-28 10:58:36 +02:00
auto_update Extract auto_update_ui crate (#21008) 2024-11-21 14:11:57 -05:00
auto_update_ui Extract auto_update_ui crate (#21008) 2024-11-21 14:11:57 -05:00
breadcrumbs Add missing shortcuts in tooltips (#18282) 2024-09-27 11:06:48 +02:00
call Fix audio tooltip logic (#21941) 2024-12-12 15:20:21 -08:00
channel Use Instant not chrono for telemetry (#20756) 2024-11-19 08:23:12 -07:00
cli Update Rust crate ipc-channel to 0.19 (#20951) 2024-11-28 10:58:10 +02:00
client Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
clock Use Instant not chrono for telemetry (#20756) 2024-11-19 08:23:12 -07:00
collab Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
collab_ui Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
collections
command_palette title_bar: Remove dependency on command_palette (#21006) 2024-11-21 13:37:34 -05:00
command_palette_hooks Improve context server lifecycle management (#20622) 2024-11-13 13:55:06 -08:00
context_server context_server: Add missing types for MCP spec to protocol 2024-11-05 (#21498) 2024-12-04 10:45:25 -05:00
context_server_settings Factor tool definitions out of assistant (#21189) 2024-11-25 18:26:34 -05:00
copilot gpui: Don't export named Context from prelude (#21869) 2024-12-11 13:21:40 -05:00
db chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
diagnostics Fix diagnostics randomized tests (#21775) 2024-12-09 21:56:43 -07:00
docs_preprocessor Don't rely on relative path for docs preprocessor (#16883) 2024-08-26 11:43:13 -04:00
editor editor: Add duplicate selection command (#21154) 2024-12-12 17:57:24 -08:00
evals windows: Set CREATE_NO_WINDOW for commands (#18447) 2024-11-20 16:52:38 -08:00
extension Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
extension_api zed_extension_api: Add a short explanation of repo format (#21824) 2024-12-10 15:04:47 -05:00
extension_cli Add new extension crate (#20089) 2024-11-01 13:20:30 -04:00
extension_host Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
extensions_ui Add "Copy Extension ID" action to extension card dropdown (#21395) 2024-12-02 11:19:42 -05:00
feature_flags Add placeholder git panel (#21894) 2024-12-11 22:13:52 -05:00
feedback title_bar: Remove dependency on feedback (#21013) 2024-11-21 15:24:04 -05:00
file_finder Add a prototype with a multi buffer having all project git changes (#21543) 2024-12-04 23:36:36 +02:00
file_icons chore: Clean up allocs around project panel (#15422) 2024-07-29 14:21:41 +02:00
fs Fix opening repos when .git is a soft link (#21153) 2024-12-12 18:29:37 -08:00
fsevent
fuzzy Improve slash commands (#16195) 2024-08-13 23:06:07 -07:00
git Detect wider variety of usernames for SSH-based remotes (#21508) 2024-12-05 15:23:37 -08:00
git_hosting_providers git_hosting_providers: Fix support for GitLab remotes containing subgroups (#19962) 2024-10-30 11:16:44 -04:00
git_ui More Git panel refinements (#21928) 2024-12-12 12:21:08 -05:00
go_to_line Only debounce the cursor position in multibuffer excerpts (#21946) 2024-12-12 18:27:06 -08:00
google_ai assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
gpui gpui: Fix for setting window titles on Windows (#21907) 2024-12-12 14:58:30 -08:00
gpui_macros gpui: Add cursor style methods of nesw nwse resize (#21801) 2024-12-10 11:54:26 -07:00
html_to_markdown chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
http_client Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
image_viewer image viewer: Allow dropping images on pane (#21803) 2024-12-10 15:01:14 +01:00
indexed_docs Overhaul extension registration (#21083) 2024-11-22 19:02:32 -05:00
inline_completion Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
inline_completion_button zeta: Add adjustments to the review modal UI (#21920) 2024-12-12 11:17:08 -03:00
install_cli
journal chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
language worktree: Fix privacy check for singleton files (#21861) 2024-12-12 01:53:00 -05:00
language_extension Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
language_model Fuse LLM completion stream to avoid a panic (#21914) 2024-12-12 11:39:35 -05:00
language_model_selector language_model_selector: Don't recreate the Picker view each render (#21939) 2024-12-12 17:08:48 -05:00
language_models Mention Lllama 3.3 in Ollama config panel (#21866) 2024-12-11 16:38:03 -05:00
language_selector Fix incorrect language selected in language selector (#21648) 2024-12-06 12:03:58 -05:00
language_tools Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
languages Improve diff syntax highlighting queries (#21740) 2024-12-12 15:18:36 -08:00
livekit_client Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
livekit_client_macos Bump to livekit 1.1.6 (#21660) 2024-12-06 12:06:55 -08:00
livekit_server Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
lsp lsp: Fill in a bunch of missing capabilities (#21924) 2024-12-12 16:39:29 +01:00
markdown markdown: Make cx the last parameter to Markdown::new_text (#21497) 2024-12-03 18:39:00 -05:00
markdown_preview markdown preview: Allow clicking on image to navigate to source location (#21630) 2024-12-06 18:31:58 +01:00
media Use LiveKit's Rust SDK on Linux while continue using Swift SDK on Mac (#21550) 2024-12-05 15:06:17 -08:00
menu
multi_buffer Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
node_runtime windows: Set CREATE_NO_WINDOW for commands (#18447) 2024-11-20 16:52:38 -08:00
notifications Markdown preview image rendering (#21082) 2024-11-22 14:49:26 -08:00
ollama Fix inaccurate Ollama context length for qwen2.5 models (#20933) 2024-11-22 10:10:01 -05:00
open_ai Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
outline Revert "remove usages of theme::color_alpha" 2024-11-19 00:24:48 -05:00
outline_panel Do not change selections when opening FS entries (#21382) 2024-12-01 14:28:48 +02:00
paths Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
picker toolchains: Use language-specific terms in UI (#20985) 2024-11-21 15:57:22 +01:00
prettier Add .prettierignore support (#21297) 2024-12-12 15:45:44 -08:00
project Add .prettierignore support (#21297) 2024-12-12 15:45:44 -08:00
project_panel project_panel: Create items when the editor is dismissed via the mouse (#21045) 2024-12-12 17:24:25 -08:00
project_symbols Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
proto Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
recent_projects markdown: Make cx the last parameter to Markdown::new_text (#21497) 2024-12-03 18:39:00 -05:00
refineable
release_channel chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
remote Fix panics from spawn_local tasks dropped on other threads in remote server (#21022) 2024-11-21 14:50:38 -07:00
remote_server Start to split out initialization and registration (#21787) 2024-12-11 14:05:10 -07:00
repl Set User Agent for Jupyter websocket connections (#21910) 2024-12-12 09:26:16 -08:00
reqwest_client assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
rich_text Markdown preview image rendering (#21082) 2024-11-22 14:49:26 -08:00
rope rope: Minor optimization for tab indices (#20911) 2024-11-21 08:48:13 +01:00
rpc Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
search search: Add ToggleRegex for buffer search (#21799) 2024-12-12 15:16:39 -08:00
semantic_index Add a prototype with a multi buffer having all project git changes (#21543) 2024-12-04 23:36:36 +02:00
semantic_version
session chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
settings Update NorwegianExtended equivalents (#21665) 2024-12-06 16:42:58 -07:00
settings_ui Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094) 2024-11-01 15:34:20 -04:00
snippet Snippet choices (#13958) 2024-11-18 22:56:34 +01:00
snippet_provider Overhaul extension registration (#21083) 2024-11-22 19:02:32 -05:00
snippets_ui Add snippet commands (#18453) 2024-10-02 13:27:16 +02:00
sqlez Update rustls and sqlx (#21506) 2024-12-03 23:22:26 -05:00
sqlez_macros Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
story chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
storybook Add preview for Checkbox with Label (#20448) 2024-11-08 22:53:15 -05:00
sum_tree Speed up point translation in the Rope (#19913) 2024-10-30 10:59:03 +01:00
supermaven Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
supermaven_api chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
tab_switcher tab_switcher: Use git-aware colors for file icons (#18733) 2024-10-04 10:37:41 -04:00
task Add the option to hide both the task and command lines in the task output (#20920) 2024-11-22 13:45:42 -05:00
tasks_ui chore: Sever terminal_view <-> tasks_ui dependency (#20946) 2024-11-21 01:07:14 +01:00
telemetry_events Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
terminal Enable toolchain venv in new terminals (#21388) 2024-12-03 16:24:30 +01:00
terminal_view Fix a panic when drop-splitting the terminal panel (#21795) 2024-12-10 13:50:19 +02:00
text Implement Helix Support (WIP) (#19175) 2024-12-03 23:19:52 -07:00
theme project panel: Use theme token for focused border color (#21593) 2024-12-05 19:17:26 -03:00
theme_extension Overhaul extension registration (#21083) 2024-11-22 19:02:32 -05:00
theme_importer Publish theme json schema v0.2.0 (#21428) 2024-12-03 12:57:39 -05:00
theme_selector title_bar: Remove dependency on theme_selector (#21009) 2024-11-21 14:33:58 -05:00
time_format chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
title_bar Fix audio tooltip logic (#21941) 2024-12-12 15:20:21 -08:00
toolchain_selector toolchains: Use language-specific terms in UI (#20985) 2024-11-21 15:57:22 +01:00
ui zeta: Add adjustments to the review modal UI (#21920) 2024-12-12 11:17:08 -03:00
ui_input
ui_macros Fix DynamicSpacing docs (#20509) 2024-11-11 12:58:39 -05:00
util Resolve documentation for visible completions (#21705) 2024-12-10 12:25:30 -07:00
vcs_menu title_bar: Remove dependency on vcs_menu (#21011) 2024-11-21 14:56:02 -05:00
vim Introduce staff-only inline completion provider (#21739) 2024-12-09 14:26:36 +01:00
vim_mode_setting Extract VimModeSetting to its own crate (#21019) 2024-11-21 16:24:38 -05:00
welcome Enhance the Vim Mode toggle discoverability (#21589) 2024-12-09 09:28:40 -03:00
workspace Add placeholder git panel (#21894) 2024-12-11 22:13:52 -05:00
worktree worktree: Fix privacy check for singleton files (#21861) 2024-12-12 01:53:00 -05:00
zed Initial git panel refinements (#21912) 2024-12-12 09:13:40 -05:00
zed_actions title_bar: Remove dependency on feedback (#21013) 2024-11-21 15:24:04 -05:00
zeta Clear completion if model doesn't produce any edit (#21925) 2024-12-12 17:23:22 +01:00