GitInfo icon indicating copy to clipboard operation
GitInfo copied to clipboard

Should `$(GitDefaultBranch)` now default to `main` rather than `master`

Open dellis1972 opened this issue 4 years ago • 4 comments

GitHub has changed its default branch from master to main. Should GitDefaultBranch be updated to match?

dellis1972 avatar Aug 13 '21 12:08 dellis1972

Perhaps. It would be a breaking change for folks and for branch commit count from fork point (if the branch remains 'master'), so perhaps this should go with a notice and a major version change?

kzu avatar Aug 20 '21 05:08 kzu

Or issue a warning now, and then change in a few months along with a major version change?

@kzu hope you are doing well btw :D

dellis1972 avatar Aug 20 '21 10:08 dellis1972

I can make the required changes for the warning if you like and do a PR.

dellis1972 avatar Aug 20 '21 10:08 dellis1972

Hey @dellis1972! Thanks for dropping by 🤟 .

So perhaps the logic for the warning would be: you don't have a GitDefaultBranch property set (meaning next major will break you). Should we warn/info if you have it set to main, saying it won't be necessary down the road? Or no warning at all in that case? (I kinda dislike it when projects duplicate values that equal their defaults, since that's just clutter).

Maybe by the following major version when the new default is introduced, the former info (that you're setting a value that will not be needed later on), becomes a warning instead that you don't need to set it?

kzu avatar Aug 24 '21 03:08 kzu