Closed okuuva closed 2 years ago
I just realised the plugin respects init.defaultBranch
if it's set. Works for me but still made the PR while I was at it
Thanks for raising this. I agree with your reasoning, but let's keep this open for a bit and see if anyone else can cite projects that would be negatively impacted. If not, I'll merge #67 in early October.
We should also document that we respect the defaultBranch
setting, since it's not obvious and I'm not sure many people are aware that setting even exists.
We should also document that we respect the
defaultBranch
setting, since it's not obvious and I'm not sure many people are aware that setting even exists.
@jhillyerd I added a short description of how the default branch name is resolved to the readme in #67. I also changed all the references of master
to (__git.default_branch)
in the command descriptions in usage section. WDYT?
Looks good, given there were no objections, I have merged #67.
I absolutely love the fact that this plugin supports both
master
andmain
as the default branch name and while the current default behaviour (check ifmaster
exists, use that if it does, otherwise fall back tomain
) works about 99.9% of the time I'd like to propose to flip the logic around to support the remaining 0.1%.One repo where I'm an active contributor recently made the change from
master
tomain
since there was a big backwards incompatible change incoming anyway and seemed like a good idea to change the default branch name at the same time.master
was left as an archive. Which means I really can't use the abbreviations anymore since they keep pointing tomaster
since it still exists.I know this is a very rare corner case but I think it still would make sense. It's simple enough a change and I guess the other corner case (where both
master
andmain
branches exist in the repo butmaster
is the default) is even rarer.