git_ui: Render avatars in git blame gutter (#39168)

Release Notes:

- Added setting to render avatar in blame gutter
This commit is contained in:
Lukas Wirth
2025-09-30 06:55:09 +00:00
committed by GitHub
parent 5922f4adce
commit cc19387853
19 changed files with 267 additions and 230 deletions
+16
View File
@@ -307,6 +307,8 @@ pub struct GitSettings {
///
/// Default: on
pub inline_blame: InlineBlameSettings,
/// Git blame settings.
pub blame: BlameSettings,
/// Which information to show in the branch picker.
///
/// Default: on
@@ -344,6 +346,14 @@ pub struct InlineBlameSettings {
pub show_commit_summary: bool,
}
#[derive(Clone, Copy, Debug)]
pub struct BlameSettings {
/// Whether to show the avatar of the author of the commit.
///
/// Default: true
pub show_avatar: bool,
}
impl GitSettings {
pub fn inline_blame_delay(&self) -> Option<Duration> {
if self.inline_blame.delay_ms.as_millis() > 0 {
@@ -447,6 +457,12 @@ impl Settings for ProjectSettings {
show_commit_summary: inline.show_commit_summary.unwrap(),
}
},
blame: {
let blame = git.blame.unwrap();
BlameSettings {
show_avatar: blame.show_avatar.unwrap(),
}
},
branch_picker: {
let branch_picker = git.branch_picker.unwrap();
BranchPickerSettings {