You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+31-8Lines changed: 31 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -244,9 +244,9 @@ values, but here they are if you need to:
244
244
This is the regex which is used to match the current branch to the correct branch configuration.
245
245
246
246
### source-branches
247
-
Because git is a directed graph GitVersion sometimes cannot tell which branch the current branch was branched from.
247
+
Because git commits only refer to parent commits (not branches) GitVersion sometimes cannot tell which branch the current branch was branched from.
248
248
249
-
Take this graph
249
+
Take this commit graph
250
250
251
251
```
252
252
* release/1.0.0 * feature/foo
@@ -271,18 +271,41 @@ By looking at this graph, you cannot tell which of these scenarios happened:
271
271
- Add a commit to both release/1.0.0 and feature/foo
272
272
- feature/foo is the base for release/1.0.0
273
273
274
-
Or put more simply, what branch was created first, `release/1.0.0` or `feature/foo`.
274
+
Or put more simply, you cannot tell which branch was created first, `release/1.0.0` or `feature/foo`.
275
275
276
-
To resolve this issue, we give GitVersion a hint to our branching workflows by telling it what types of branches it can be created from. For example feature branches are by default configured to have the following source branches:
276
+
To resolve this issue, we give GitVersion a hint about our branching workflows by telling it what types of branches a branch can be created from. For example, feature branches are, by default, configured to have the following source branches:
This means that we will never bother to evaluate pull request branches as merge base options, being explicit like this helps GitVersion be much faster too.
280
+
This means that we will never bother to evaluate pull request branches as merge base options and being explicit in this way also improves the performance of GitVersion.
281
281
282
282
### is-source-branch-for
283
-
The reverse of the above setting. This property was introduced to keep it easy to extend GitVersion's config.
283
+
The reverse of `source-branches`. This property was introduced to keep it easy to extend GitVersion's config.
284
284
285
-
When you add a new branch type this allows you to specify both source-branches for the new branch, and also add the new branch to existing branch configurations. For example if you create a new branch called `unstable` you could set a value of `['release', 'master', 'feature']` etc.
285
+
It exists to make it easier to extend GitVersion's configuration. If only `source-branches` exists and you add a new branch type, for instance `unstable/`, you then need to re-define the `source-branches` configuration value for existing branches (like feature/) to now include the new unstable branch.
0 commit comments