Commit 9d00191
committed
Add length check for log indent level
Add length check for log indent level to avoid exceptions like this:
Error Message:
System.ArgumentOutOfRangeException : Length cannot be less than zero.
Parameter name: length
Stack Trace:
at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0004a] in <f3f2aa82c3a04d48845485ce37124803>:0
at GitVersion.Logger+<>c__DisplayClass19_0.<IndentLog>b__0 () [0x00010] in <05fc21618d444a47be7b45d99fa1d3c6>:0
at GitVersion.Logger+ActionDisposable.Dispose () [0x00000] in <05fc21618d444a47be7b45d99fa1d3c6>:0
at GitVersion.VersionCalculation.BaseVersionCalculator.GetBaseVersion (GitVersion.GitVersionContext context) [0x00211] in
<05fc21618d444a47be7b45d99fa1d3c6>:0
at GitVersion.VersionCalculation.NextVersionCalculator.FindVersion (GitVersion.GitVersionContext context) [0x0003f] in
<05fc21618d444a47be7b45d99fa1d3c6>:0
at GitVersion.GitVersionFinder.FindVersion (GitVersion.GitVersionContext context) [0x000a1] in <05fc21618d444a47be7b45d99fa1d3c6>:0
at GitVersionCore.Tests.GitToolsTestingExtensions.ExecuteGitVersion (GitVersion.GitVersionContext context) [0x00007] in
<e141d799e05748d0bf9753d21cdcadd7>:0
at GitVersionCore.Tests.GitToolsTestingExtensions.GetVersion (GitTools.Testing.RepositoryFixtureBase fixture, GitVersion.Config configuration,
LibGit2Sharp.IRepository repository, System.String commitId, System.Boolean isForTrackedBranchOnly, System.String targetBranch) [0x00030] in
<e141d799e05748d0bf9753d21cdcadd7>:0
at GitVersionCore.Tests.GitToolsTestingExtensions.AssertFullSemver (GitTools.Testing.RepositoryFixtureBase fixture, GitVersion.Config
configuration, System.String fullSemver, LibGit2Sharp.IRepository repository, System.String commitId, System.Boolean isForTrackedBranchOnly,
System.String targetBranch) [0x00050] in <e141d799e05748d0bf9753d21cdcadd7>:0
at GitVersionCore.Tests.GitToolsTestingExtensions.AssertFullSemver (GitTools.Testing.RepositoryFixtureBase fixture, System.String fullSemver,
LibGit2Sharp.IRepository repository, System.String commitId, System.Boolean isForTrackedBranchOnly, System.String targetBranch) [0x00007] in
<e141d799e05748d0bf9753d21cdcadd7>:0
at DocumentationSamples.GitFlowFeatureBranch () [0x000a2] in <e141d799e05748d0bf9753d21cdcadd7>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <f3f2aa82c3a04d48845485ce37124803>:0
https://dev.azure.com/GitTools/GitVersion/_build/results?buildId=191&view=logs&jobId=a5e52b91-c83f-5429-4a68-c246fc63a4f7&taskId=d6b35a2b-3a7d-590e-76eb-a415813199f6&lineStart=225&lineEnd=226&colStart=1&colEnd=11 parent c482ce1 commit 9d00191
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments