Include commit summary in inline Git blame (#19759)

Closes #19758

Release Notes:

- Added feature to show commit summary as part of the inline Git blame

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This commit is contained in:
PJ Tatlow
2024-10-29 11:35:31 +01:00
committed by GitHub
co-authored by Thorsten Ball
parent f7b2b41df9
commit 84328c303b
3 changed files with 29 additions and 1 deletions
+18
View File
@@ -111,6 +111,16 @@ impl GitSettings {
_ => None,
}
}
pub fn show_inline_commit_summary(&self) -> bool {
match self.inline_blame {
Some(InlineBlameSettings {
show_commit_summary,
..
}) => show_commit_summary,
_ => false,
}
}
}
#[derive(Clone, Copy, Debug, Default, Serialize, Deserialize, JsonSchema)]
@@ -141,11 +151,19 @@ pub struct InlineBlameSettings {
///
/// Default: 0
pub min_column: Option<u32>,
/// Whether to show commit summary as part of the inline blame.
///
/// Default: false
#[serde(default = "false_value")]
pub show_commit_summary: bool,
}
const fn true_value() -> bool {
true
}
const fn false_value() -> bool {
true
}
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
pub struct BinarySettings {