Fix the log spam from the BlameBuffer request (#19921)

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-29 13:02:21 -07:00 committed by GitHub
parent f3b7f5944d
commit 9818835c9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 38 deletions

View file

@ -3420,7 +3420,7 @@ impl Project {
buffer: &Model<Buffer>,
version: Option<clock::Global>,
cx: &AppContext,
) -> Task<Result<Blame>> {
) -> Task<Result<Option<Blame>>> {
self.buffer_store.read(cx).blame_buffer(buffer, version, cx)
}
@ -4273,17 +4273,6 @@ impl Completion {
}
}
#[derive(Debug)]
pub struct NoRepositoryError {}
impl std::fmt::Display for NoRepositoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "no git repository for worktree found")
}
}
impl std::error::Error for NoRepositoryError {}
pub fn sort_worktree_entries(entries: &mut [Entry]) {
entries.sort_by(|entry_a, entry_b| {
compare_paths(