Skip to content

Commit 9fd9bc2

Browse files
committed
Add trunk as supported main branch name for git-flow, because its fully compatible, becuase trunk based development is an easyfied version of git-flow
1 parent 86b7707 commit 9fd9bc2

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

docs/manual.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ git-graph --model my-model
242242
# to most short-leved branches. This is used to back-trace branches.
243243
# Branches not matching any pattern are assumed least persistent.
244244
persistence = [
245-
'^(master|main)$', # Matches exactly `master` or `main`
245+
'^(master|main|trunk)$', # Matches exactly `master` or `main` or `trunk`
246246
'^(develop|dev)$',
247247
'^feature.*$', # Matches everything starting with `feature`
248248
'^release.*$',
@@ -251,12 +251,12 @@ persistence = [
251251
]
252252

253253
# RegEx patterns for visual ordering of branches, from left to right.
254-
# Here, `master` or `main` are shown left-most, followed by branches
254+
# Here, `master`, `main` or `trunk` are shown left-most, followed by branches
255255
# starting with `hotfix` or `release`, followed by `develop` or `dev`.
256256
# Branches not matching any pattern (e.g. starting with `feature`)
257257
# are displayed further to the right.
258258
order = [
259-
'^(master|main)$', # Matches exactly `master` or `main`
259+
'^(master|main|trunk)$', # Matches exactly `master` or `main` or `trunk`
260260
'^(hotfix|release).*$', # Matches everything starting with `hotfix` or `release`
261261
'^(develop|dev)$', # Matches exactly `develop` or `dev`
262262
]
@@ -268,7 +268,7 @@ order = [
268268
# will be used alternating (see e.g. `feature...`).
269269
matches = [
270270
[
271-
'^(master|main)$',
271+
'^(master|main|trunk)$',
272272
['bright_blue'],
273273
],
274274
[
@@ -303,7 +303,7 @@ unknown = ['white']
303303
[svg_colors]
304304
matches = [
305305
[
306-
'^(master|main)$',
306+
'^(master|main|trunk)$',
307307
['blue'],
308308
],
309309
[

src/settings.rs

+17-8
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,22 @@ impl BranchSettingsDef {
7878
pub fn git_flow() -> Self {
7979
BranchSettingsDef {
8080
persistence: vec![
81-
r"^(master|main)$".to_string(),
81+
r"^(master|main|trunk)$".to_string(),
8282
r"^(develop|dev)$".to_string(),
8383
r"^feature.*$".to_string(),
8484
r"^release.*$".to_string(),
8585
r"^hotfix.*$".to_string(),
8686
r"^bugfix.*$".to_string(),
8787
],
8888
order: vec![
89-
r"^(master|main)$".to_string(),
89+
r"^(master|main|trunk)$".to_string(),
9090
r"^(hotfix|release).*$".to_string(),
9191
r"^(develop|dev)$".to_string(),
9292
],
9393
terminal_colors: ColorsDef {
9494
matches: vec![
9595
(
96-
r"^(master|main)$".to_string(),
96+
r"^(master|main|trunk)$".to_string(),
9797
vec!["bright_blue".to_string()],
9898
),
9999
(
@@ -116,7 +116,10 @@ impl BranchSettingsDef {
116116

117117
svg_colors: ColorsDef {
118118
matches: vec![
119-
(r"^(master|main)$".to_string(), vec!["blue".to_string()]),
119+
(
120+
r"^(master|main|trunk)$".to_string(),
121+
vec!["blue".to_string()],
122+
),
120123
(r"^(develop|dev)$".to_string(), vec!["orange".to_string()]),
121124
(
122125
r"^(feature|fork/).*$".to_string(),
@@ -134,12 +137,15 @@ impl BranchSettingsDef {
134137
/// Simple feature-based model.
135138
pub fn simple() -> Self {
136139
BranchSettingsDef {
137-
persistence: vec![r"^(master|main)$".to_string()],
138-
order: vec![r"^tags/.*$".to_string(), r"^(master|main)$".to_string()],
140+
persistence: vec![r"^(master|main|trunk)$".to_string()],
141+
order: vec![
142+
r"^tags/.*$".to_string(),
143+
r"^(master|main|trunk)$".to_string(),
144+
],
139145
terminal_colors: ColorsDef {
140146
matches: vec![
141147
(
142-
r"^(master|main)$".to_string(),
148+
r"^(master|main|trunk)$".to_string(),
143149
vec!["bright_blue".to_string()],
144150
),
145151
(r"^tags/.*$".to_string(), vec!["bright_green".to_string()]),
@@ -155,7 +161,10 @@ impl BranchSettingsDef {
155161

156162
svg_colors: ColorsDef {
157163
matches: vec![
158-
(r"^(master|main)$".to_string(), vec!["blue".to_string()]),
164+
(
165+
r"^(master|main|trunk)$".to_string(),
166+
vec!["blue".to_string()],
167+
),
159168
(r"^tags/.*$".to_string(), vec!["green".to_string()]),
160169
],
161170
unknown: vec![

0 commit comments

Comments
 (0)