Add staged checkboxes to multibuffer headers (#24308)

Co-authored-by: Mikayla <mikayla@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2025-02-05 18:32:07 -07:00 committed by GitHub
parent 0671be215f
commit 5d1c56829a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 151 additions and 37 deletions

View file

@ -15,6 +15,7 @@ use gpui::{
use language::{Buffer, LanguageRegistry};
use rpc::{proto, AnyProtoClient};
use settings::WorktreeId;
use std::path::Path;
use std::sync::Arc;
use text::BufferId;
use util::{maybe, ResultExt};
@ -341,10 +342,18 @@ impl Repository {
}
pub fn project_path_to_repo_path(&self, path: &ProjectPath) -> Option<RepoPath> {
if path.worktree_id != self.worktree_id {
self.worktree_id_path_to_repo_path(path.worktree_id, &path.path)
}
pub fn worktree_id_path_to_repo_path(
&self,
worktree_id: WorktreeId,
path: &Path,
) -> Option<RepoPath> {
if worktree_id != self.worktree_id {
return None;
}
self.repository_entry.relativize(&path.path).log_err()
self.repository_entry.relativize(path).log_err()
}
pub fn open_commit_buffer(