summaryrefslogtreecommitdiffstats
path: root/src/configs/git_branch.rs
diff options
context:
space:
mode:
authorSagittarius-a <sagittarius-a@users.noreply.github.com>2020-11-23 22:07:16 +0100
committerGitHub <noreply@github.com>2020-11-23 22:07:16 +0100
commit688f1b3457addedf10fe673e9329756d9bd2f6c9 (patch)
tree8ae655bc3a71b3b0f934433f7f839b29683b301a /src/configs/git_branch.rs
parentcf297ff25d70678b446bfffaab3f5aa7e71c7fa6 (diff)
feat(git_branch): add remote branch name if different than local branch (#1915)
* feat(git_branch): add remote branch name if different than local branch * feat(git_branch): Implement a more customizable remote branch * feat(git_branch): Use more explicit API function name * feat(git_branch): Remove forgotten draft documentation * feat(git_branch): Set less verbose defaults * feat(git_branch): Handle case to always display remote * feat(git_branch): Fix error in rebase operation
Diffstat (limited to 'src/configs/git_branch.rs')
-rw-r--r--src/configs/git_branch.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/configs/git_branch.rs b/src/configs/git_branch.rs
index b3e8f7a3b..8e4bb3caf 100644
--- a/src/configs/git_branch.rs
+++ b/src/configs/git_branch.rs
@@ -10,18 +10,20 @@ pub struct GitBranchConfig<'a> {
pub truncation_length: i64,
pub truncation_symbol: &'a str,
pub only_attached: bool,
+ pub always_show_remote: bool,
pub disabled: bool,
}
impl<'a> RootModuleConfig<'a> for GitBranchConfig<'a> {
fn new() -> Self {
GitBranchConfig {
- format: "on [$symbol$branch]($style) ",
+ format: "on [$symbol$branch]($style)(:[$remote]($style)) ",
symbol: " ",
style: "bold purple",
truncation_length: std::i64::MAX,
truncation_symbol: "…",
only_attached: false,
+ always_show_remote: false,
disabled: false,
}
}