Skip to content

Commit

Permalink
Remove git statuses from the worktree entries,
Browse files Browse the repository at this point in the history
mark places that used to use it for refactoring

co-authored-by: Cole <[email protected]>
  • Loading branch information
mikayla-maki and cole-miller committed Dec 12, 2024
1 parent 8df4352 commit d7ea3dd
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 198 deletions.
5 changes: 2 additions & 3 deletions crates/project/src/lsp_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ pub use language::Location;
#[cfg(any(test, feature = "test-support"))]
pub use prettier::FORMAT_SUFFIX as TEST_PRETTIER_FORMAT_SUFFIX;
pub use worktree::{
Entry, EntryKind, File, LocalWorktree, PathChange, ProjectEntryId, RepositoryEntry,
UpdatedEntriesSet, UpdatedGitRepositoriesSet, Worktree, WorktreeId, WorktreeSettings,
FS_WATCH_LATENCY,
Entry, EntryKind, File, LocalWorktree, PathChange, ProjectEntryId, UpdatedEntriesSet,
UpdatedGitRepositoriesSet, Worktree, WorktreeId, WorktreeSettings, FS_WATCH_LATENCY,
};

const SERVER_LAUNCHING_BEFORE_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5);
Expand Down
5 changes: 2 additions & 3 deletions crates/project/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ pub use task_inventory::{
BasicContextProvider, ContextProviderWithTasks, Inventory, TaskSourceKind,
};
pub use worktree::{
Entry, EntryKind, File, LocalWorktree, PathChange, ProjectEntryId, RepositoryEntry,
UpdatedEntriesSet, UpdatedGitRepositoriesSet, Worktree, WorktreeId, WorktreeSettings,
FS_WATCH_LATENCY,
Entry, EntryKind, File, LocalWorktree, PathChange, ProjectEntryId, UpdatedEntriesSet,
UpdatedGitRepositoriesSet, Worktree, WorktreeId, WorktreeSettings, FS_WATCH_LATENCY,
};

pub use buffer_store::ProjectTransaction;
Expand Down
1 change: 0 additions & 1 deletion crates/project_panel/src/project_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,6 @@ impl ProjectPanel {
is_external: false,
is_private: false,
is_always_included: entry.is_always_included,
git_status: entry.git_status,
canonical_path: entry.canonical_path.clone(),
char_bag: entry.char_bag,
is_fifo: entry.is_fifo,
Expand Down
3 changes: 2 additions & 1 deletion crates/proto/proto/zed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1765,7 +1765,7 @@ message Entry {
bool is_ignored = 7;
bool is_external = 8;
reserved 6;
optional GitStatus git_status = 9;
reserved 9;
bool is_fifo = 10;
optional uint64 size = 11;
optional string canonical_path = 12;
Expand All @@ -1785,6 +1785,7 @@ enum GitStatus {
Added = 0;
Modified = 1;
Conflict = 2;
Deleted = 3;
}

message BufferState {
Expand Down
4 changes: 2 additions & 2 deletions crates/title_bar/src/title_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use gpui::{
Interactivity, IntoElement, Model, MouseButton, ParentElement, Render, Stateful,
StatefulInteractiveElement, Styled, Subscription, View, ViewContext, VisualContext, WeakView,
};
use project::{Project, RepositoryEntry};
use project::{Project, GitRepository};
use rpc::proto;
use settings::Settings as _;
use smallvec::SmallVec;
Expand Down Expand Up @@ -432,7 +432,7 @@ impl TitleBar {
let workspace = self.workspace.upgrade()?;
let branch_name = entry
.as_ref()
.and_then(RepositoryEntry::branch)
.and_then(GitRepository::branch)
.map(|branch| util::truncate_and_trailoff(&branch, MAX_BRANCH_NAME_LENGTH))?;
Some(
Button::new("project_branch_trigger", branch_name)
Expand Down
Loading

0 comments on commit d7ea3dd

Please sign in to comment.