summaryrefslogtreecommitdiffstats
path: root/src/configs/git_branch.rs
diff options
context:
space:
mode:
authorIsaacHorvath <isaac.horvath@gmail.com>2022-03-16 16:41:49 -0400
committerGitHub <noreply@github.com>2022-03-16 21:41:49 +0100
commitbae16b525de1f05a7ad125b5f4a8cb8baa7d5fae (patch)
tree02bd70c8141edec3a676e847b878e02737033ecc /src/configs/git_branch.rs
parent86953272a7f1471e9a3422a7543d97b953406df6 (diff)
feat(git_branch): add 'ignore_branches' option (#3753)
* git-branch: Add option 'ignore_branches' * git-branch: add 'ignore_branches' test * git-branch: comma-separated to toml array * git-branch: update ignore_branches test * git_branch: fix formatting * git-branch: fix formatting again * Initialize ignore_branches as empty Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com> * Use iter().any and branch_name as suggested * Fix formatting Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
Diffstat (limited to 'src/configs/git_branch.rs')
-rw-r--r--src/configs/git_branch.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/configs/git_branch.rs b/src/configs/git_branch.rs
index d9c40c9ad..c20321592 100644
--- a/src/configs/git_branch.rs
+++ b/src/configs/git_branch.rs
@@ -12,6 +12,7 @@ pub struct GitBranchConfig<'a> {
pub truncation_symbol: &'a str,
pub only_attached: bool,
pub always_show_remote: bool,
+ pub ignore_branches: Vec<&'a str>,
pub disabled: bool,
}
@@ -25,6 +26,7 @@ impl<'a> Default for GitBranchConfig<'a> {
truncation_symbol: "…",
only_attached: false,
always_show_remote: false,
+ ignore_branches: vec![],
disabled: false,
}
}