boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.81k stars 267 forks source link

Suggested primary branch name #447

Open sgoggins opened 7 months ago

sgoggins commented 7 months ago

Most of the projects I use on Github have shifted the primary branch name to main. To stay current with this practice, we might consider following suit.

boyter commented 7 months ago

Yeah its a result of the name being set before the massive political push to change the names. I never bothered mostly due to being lazy.

I don't think its that hard to do from memory although I am unsure of the downstream impacts of something like this, which I guess is another reason I have been holding off.

spenserblack commented 2 months ago

If you're concerned about people who use SCC from the master branch as a dependency, one trick is to push one final commit to master with a warning before renaming. Something like

func init() {
    fmt.Fprintln(os.Stderr, "DEPRECATED: Use scc@main instead of scc@master")
}

Another trick I've seen is to make master a sort of alias by keeping both branches, and pushing anything added to main to master in a workflow. You could probably make a tag called master that always gets force-pushed to the latest main commit.

boyter commented 1 month ago

Yeah I had thought about something like that. If I ever do make the effort to rename its something I would do. Most likely by just having master follow main so both work.