Rename 'project_core' crate to 'worktree', make it just about worktrees (#9189)
This is just a refactor. I noticed that we now have a `project_core` crate, which mainly contains the `Worktree` type and its private helpers, plus the project's settings. In this PR, I've renamed that crate to `worktree` and did some minor simplification to its module structure. I also extracted a new `WorktreeSettings` settings type from the `ProjectSettings`, so that the worktree settings could live in the worktree crate. This way, the crate is now exclusively about worktree logic. Release Notes: - N/A
This commit is contained in:
parent
2b67bb27cf
commit
dfcc143ead
22 changed files with 215 additions and 190 deletions
|
@ -1717,7 +1717,7 @@ mod tests {
|
|||
use collections::HashSet;
|
||||
use gpui::{TestAppContext, View, VisualTestContext, WindowHandle};
|
||||
use pretty_assertions::assert_eq;
|
||||
use project::{project_settings::ProjectSettings, FakeFs};
|
||||
use project::{FakeFs, WorktreeSettings};
|
||||
use serde_json::json;
|
||||
use settings::SettingsStore;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -1819,8 +1819,8 @@ mod tests {
|
|||
init_test(cx);
|
||||
cx.update(|cx| {
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<ProjectSettings>(cx, |project_settings| {
|
||||
project_settings.file_scan_exclusions =
|
||||
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||
worktree_settings.file_scan_exclusions =
|
||||
Some(vec!["**/.git".to_string(), "**/4/**".to_string()]);
|
||||
});
|
||||
});
|
||||
|
@ -3026,8 +3026,8 @@ mod tests {
|
|||
init_test_with_editor(cx);
|
||||
cx.update(|cx| {
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<ProjectSettings>(cx, |project_settings| {
|
||||
project_settings.file_scan_exclusions = Some(Vec::new());
|
||||
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
||||
});
|
||||
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
|
||||
project_panel_settings.auto_reveal_entries = Some(false)
|
||||
|
@ -3264,8 +3264,8 @@ mod tests {
|
|||
init_test_with_editor(cx);
|
||||
cx.update(|cx| {
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<ProjectSettings>(cx, |project_settings| {
|
||||
project_settings.file_scan_exclusions = Some(Vec::new());
|
||||
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
||||
});
|
||||
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
|
||||
project_panel_settings.auto_reveal_entries = Some(false)
|
||||
|
@ -3582,8 +3582,8 @@ mod tests {
|
|||
Project::init_settings(cx);
|
||||
|
||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||
store.update_user_settings::<ProjectSettings>(cx, |project_settings| {
|
||||
project_settings.file_scan_exclusions = Some(Vec::new());
|
||||
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue