mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
fix(git_commit): leading space in git commit tag (#2697)
* Move git_commit tag leading space into config Fixes #2692 * Update doc default commit tag
This commit is contained in:
@@ -23,7 +23,7 @@ impl<'a> Default for GitCommitConfig<'a> {
|
||||
style: "green bold",
|
||||
only_detached: true,
|
||||
disabled: false,
|
||||
tag_symbol: "🏷 ",
|
||||
tag_symbol: " 🏷 ",
|
||||
tag_disabled: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
_ => None,
|
||||
})
|
||||
.map(|variable| match variable {
|
||||
"tag" => Some(Ok(format!(" {}{}", &config.tag_symbol, &tag_name))),
|
||||
"tag" => Some(Ok(format!("{}{}", &config.tag_symbol, &tag_name))),
|
||||
_ => None,
|
||||
})
|
||||
.parse(None)
|
||||
@@ -323,7 +323,7 @@ mod tests {
|
||||
.config(toml::toml! {
|
||||
[git_commit]
|
||||
tag_disabled = false
|
||||
tag_symbol = ""
|
||||
tag_symbol = " "
|
||||
})
|
||||
.path(&repo_dir.path())
|
||||
.collect();
|
||||
@@ -395,7 +395,7 @@ mod tests {
|
||||
[git_commit]
|
||||
only_detached = false
|
||||
tag_disabled = false
|
||||
tag_symbol = ""
|
||||
tag_symbol = " "
|
||||
})
|
||||
.path(&repo_dir.path())
|
||||
.collect();
|
||||
|
||||
Reference in New Issue
Block a user