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:
Jason-S-Ross
2021-05-08 12:01:00 -07:00
committed by GitHub
parent 45bb13047d
commit 3b37bcd063
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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,
}
}
+3 -3
View File
@@ -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();