Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default branch explicitly #243

Closed
wants to merge 7 commits into from
Closed

Conversation

christopher-dG
Copy link
Member

Closes #233

The Git plugin will set the default branch with the following priority:

  • The branch keyword to the Git constructor
  • The Git setting init.defaultBranch
  • "main"

And all the other plugins can use that where they need to refer to the default branch.

This needs the default_branch from #242.

This adds a bit of awkwardness for testing with preexisting Git configurations that set init.defaultBranch to something other than main, since a bunch of tests assume that it'll be unset. I added with_clean_gitconfig to sort of solve that, but the mocking is too slow to use on the reference tests so they're just disabled in that case.

@codecov
Copy link

codecov bot commented Nov 4, 2020

Codecov Report

Merging #243 (2b9e61d) into master (70ba6f7) will decrease coverage by 81.51%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #243       +/-   ##
==========================================
- Coverage   82.18%   0.67%   -81.52%     
==========================================
  Files          19      19               
  Lines         612     594       -18     
==========================================
- Hits          503       4      -499     
- Misses        109     590      +481     
Impacted Files Coverage Δ
src/plugins/ci.jl 0.00% <ø> (-88.00%) ⬇️
src/plugins/coverage.jl 0.00% <ø> (-90.91%) ⬇️
src/plugins/git.jl 0.00% <ø> (-83.61%) ⬇️
src/plugins/compat_helper.jl 0.00% <0.00%> (-100.00%) ⬇️
src/plugins/readme.jl 0.00% <0.00%> (-92.31%) ⬇️
src/plugins/tagbot.jl 0.00% <0.00%> (-88.89%) ⬇️
src/template.jl 3.17% <0.00%> (-87.38%) ⬇️
src/show.jl 0.00% <0.00%> (-85.72%) ⬇️
src/PkgTemplates.jl 0.00% <0.00%> (-85.72%) ⬇️
src/plugin.jl 0.00% <0.00%> (-83.88%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70ba6f7...2b9e61d. Read the comment docs.

@nickrobinson251
Copy link
Collaborator

bump :)

@abelsiqueira
Copy link

I would love to see this PR merged soon. Specifically, I'm preparing a tutorial and noticed that devbranch="main" is missing from docs/make.jl. I'm also keeping an eye at JuliaDocs/Documenter.jl#1443.

@christopher-dG
Copy link
Member Author

If anyone has time to take over, they should feel free -- I currently do not, unfortunately.

@abelsiqueira
Copy link

I could try to understand and fix this PR, but it is massive, and I don't know the project well enough. So I would probably just get frustrated along the way.
Instead, I could try to just fix the make.jl part. Is that of interest? At least this would push something over the main branch border and might be the kickstart for the rest of the changes.

By the way, my concern here is that I'm using PkgTemplates with mostly default options in my tutorial, which creates a git repo with main branch, but Documenter.jl still uses master, so the default is not consistent.

@timholy
Copy link
Member

timholy commented Oct 8, 2021

Superseded by #316, please close (I forgot to put that in my PR OP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deal with new default branch name
4 participants