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
{{ message }}
Repository navigation
[Improvement] Rename default master branch to main #2570
@arturcic is this a "visual" / GitVersion branch change only or also a behavioral runtime change in how GitVersion works?
The reason I ask is because I see lots of unit tests changing from master => main but I think we should actually duplicate and test both master and main (and leave it it to the users whether they want to go ahead with this "main branch thing").
@GeertvanHorrik the tests internally use main to make it consistent, but master is still supported. I introduced the constant MainBranch that is used in the tests, and before the switch it had the master value. This is for the internal code only. As for the consumer, default is main, but you can also use the master in GitVersion.yml as there is a compatibility added.
Just an FYI I found that this causes a failure when using a branch configuration that currently references master. Changing the source-branches fixes the problem however that seems like an accidental breaking change. ❤️
Activity
asbjornu commentedon Jan 29, 2021
Yes, 👍🏼 from me.
gep13 commentedon Jan 29, 2021
Seems like a good idea to me!
dazinator commentedon Jan 29, 2021
Whats the benefit?
asbjornu commentedon Jan 29, 2021
There's a lot of good information here, @dazinator.
dazinator commentedon Jan 31, 2021
Oh dear. Politics.
I guess everyone who works in master data management is hoping they will go under the radar of this particular political agenda!
GeertvanHorrik commentedon Feb 1, 2021
@arturcic is this a "visual" / GitVersion branch change only or also a behavioral runtime change in how GitVersion works?
The reason I ask is because I see lots of unit tests changing from master => main but I think we should actually duplicate and test both master and main (and leave it it to the users whether they want to go ahead with this "main branch thing").
arturcic commentedon Feb 1, 2021
@GeertvanHorrik the tests internally use
mainto make it consistent, butmasteris still supported. I introduced the constantMainBranchthat is used in the tests, and before the switch it had themastervalue. This is for the internal code only. As for the consumer, default ismain, but you can also use the master inGitVersion.ymlas there is a compatibility added.arturcic commentedon Feb 1, 2021
That means projects that were using the GitVersion before this change will continue to work
GeertvanHorrik commentedon Feb 1, 2021
Thanks for the explanation, then I don't mind, as long as it's not a breaking change for people sticking with master 👍
gep13 commentedon Feb 1, 2021
This is a nice touch...
Got that when browsing to repository after rename.
github-actions commentedon Feb 7, 2021
🎉 This issue has been resolved in version 5.6.5 🎉
The release is available on:
Your GitReleaseManager bot 📦🚀
david-driscoll commentedon Feb 8, 2021
Just an FYI I found that this causes a failure when using a branch configuration that currently references
master. Changing thesource-branchesfixes the problem however that seems like an accidental breaking change. ❤️asbjornu commentedon Feb 8, 2021
@david-driscoll, this should have been fixed in #2588.