Skip to content

Commit

Permalink
Change GitDefaultBranch to main instead of master
Browse files Browse the repository at this point in the history
It's been a while and most repos I encounter nowadays have switched.

Update docs, change to new default.

Closes #167
  • Loading branch information
kzu committed Feb 6, 2023
1 parent 3d7119a commit 0b55393
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Available [MSBuild properties](https://learn.microsoft.com/en-us/visualstudio/ms
$(GitDefaultBranch): determines the base branch used to
calculate commits on top of current branch.
Defaults to 'master'.
Defaults to 'main'.
$(GitVersionFile): determines the name of a file in the Git
repository root used to provide the base
Expand Down
4 changes: 2 additions & 2 deletions src/GitInfo/build/GitInfo.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$(GitDefaultBranch): determines the base branch used to
calculate commits on top of current branch.
Defaults to 'master'.
Defaults to 'main'.
$(GitVersionFile): determines the name of a file in the Git
repository root used to provide the base
Expand Down Expand Up @@ -98,7 +98,7 @@
<!-- Look it upwards and grab the first one we find. -->
<GitVersionFile Condition="'$([MSBuild]::GetDirectoryNameOfFileAbove($(GitInfoBaseDir), $(GitVersionFile)))' != ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(GitInfoBaseDir), $(GitVersionFile)))\$(GitVersionFile)</GitVersionFile>

<GitDefaultBranch Condition="'$(GitDefaultBranch)' == ''">master</GitDefaultBranch>
<GitDefaultBranch Condition="'$(GitDefaultBranch)' == ''">main</GitDefaultBranch>
<GitDefaultCommit Condition="'$(GitDefaultCommit)' == ''">0000000</GitDefaultCommit>
<GitDefaultVersion Condition="'$(GitDefaultVersion)' == ''">0.0.0</GitDefaultVersion>

Expand Down

0 comments on commit 0b55393

Please sign in to comment.