Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trunk as supported main branch name for git-flow #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ git-graph --model my-model
# to most short-leved branches. This is used to back-trace branches.
# Branches not matching any pattern are assumed least persistent.
persistence = [
'^(master|main)$', # Matches exactly `master` or `main`
'^(master|main|trunk)$', # Matches exactly `master` or `main` or `trunk`
'^(develop|dev)$',
'^feature.*$', # Matches everything starting with `feature`
'^release.*$',
Expand All @@ -251,12 +251,12 @@ persistence = [
]

# RegEx patterns for visual ordering of branches, from left to right.
# Here, `master` or `main` are shown left-most, followed by branches
# Here, `master`, `main` or `trunk` are shown left-most, followed by branches
# starting with `hotfix` or `release`, followed by `develop` or `dev`.
# Branches not matching any pattern (e.g. starting with `feature`)
# are displayed further to the right.
order = [
'^(master|main)$', # Matches exactly `master` or `main`
'^(master|main|trunk)$', # Matches exactly `master` or `main` or `trunk`
'^(hotfix|release).*$', # Matches everything starting with `hotfix` or `release`
'^(develop|dev)$', # Matches exactly `develop` or `dev`
]
Expand All @@ -268,7 +268,7 @@ order = [
# will be used alternating (see e.g. `feature...`).
matches = [
[
'^(master|main)$',
'^(master|main|trunk)$',
['bright_blue'],
],
[
Expand Down Expand Up @@ -303,7 +303,7 @@ unknown = ['white']
[svg_colors]
matches = [
[
'^(master|main)$',
'^(master|main|trunk)$',
['blue'],
],
[
Expand Down
16 changes: 8 additions & 8 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ impl BranchSettingsDef {
pub fn git_flow() -> Self {
BranchSettingsDef {
persistence: vec![
r"^(master|main)$".to_string(),
r"^(master|main|trunk)$".to_string(),
r"^(develop|dev)$".to_string(),
r"^feature.*$".to_string(),
r"^release.*$".to_string(),
r"^hotfix.*$".to_string(),
r"^bugfix.*$".to_string(),
],
order: vec![
r"^(master|main)$".to_string(),
r"^(master|main|trunk)$".to_string(),
r"^(hotfix|release).*$".to_string(),
r"^(develop|dev)$".to_string(),
],
terminal_colors: ColorsDef {
matches: vec![
(
r"^(master|main)$".to_string(),
r"^(master|main|trunk)$".to_string(),
vec!["bright_blue".to_string()],
),
(
Expand All @@ -116,7 +116,7 @@ impl BranchSettingsDef {

svg_colors: ColorsDef {
matches: vec![
(r"^(master|main)$".to_string(), vec!["blue".to_string()]),
(r"^(master|main|trunk)$".to_string(), vec!["blue".to_string()]),
(r"^(develop|dev)$".to_string(), vec!["orange".to_string()]),
(
r"^(feature|fork/).*$".to_string(),
Expand All @@ -134,12 +134,12 @@ impl BranchSettingsDef {
/// Simple feature-based model.
pub fn simple() -> Self {
BranchSettingsDef {
persistence: vec![r"^(master|main)$".to_string()],
order: vec![r"^tags/.*$".to_string(), r"^(master|main)$".to_string()],
persistence: vec![r"^(master|main|trunk)$".to_string()],
order: vec![r"^tags/.*$".to_string(), r"^(master|main|trunk)$".to_string()],
terminal_colors: ColorsDef {
matches: vec![
(
r"^(master|main)$".to_string(),
r"^(master|main|trunk)$".to_string(),
vec!["bright_blue".to_string()],
),
(r"^tags/.*$".to_string(), vec!["bright_green".to_string()]),
Expand All @@ -155,7 +155,7 @@ impl BranchSettingsDef {

svg_colors: ColorsDef {
matches: vec![
(r"^(master|main)$".to_string(), vec!["blue".to_string()]),
(r"^(master|main|trunk)$".to_string(), vec!["blue".to_string()]),
(r"^tags/.*$".to_string(), vec!["green".to_string()]),
],
unknown: vec![
Expand Down