Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Fix assumed "master" as default branch #370

Merged
merged 4 commits into from Sep 3, 2020
Merged

Fix assumed "master" as default branch #370

merged 4 commits into from Sep 3, 2020

Conversation

mattmc3
Copy link
Contributor

@mattmc3 mattmc3 commented Sep 2, 2020

If applied, this commit will...
This commit addresses issue #369, which describes antibody's default behavior of assuming the "master" branch is the branch desired instead of taking whatever default branch the repo maintainer specifies. Now, instead of hard coding "master", if no branch is specified then git clone and git pull will not specify a branch either.

Why is this change being made?
GitHub is moving towards naming the new default branch "main". This will break antibody without this fix.

Possible regressions to note

  • IF a repo happens to have a "master" branch that is not its default, some users may experience a breaking change when antibody pulls that plugin since antibody previously ignored the repo default branch. This seems low risk given that the repo maintainer probably changed the default branch for a reason.

`nlreturn` checks for a new line before return and branch statements to increase code clarity. This project does not adhere to this convention and fails `make lint` without this change.
fribmendes/geometry changed its default branch to "main", and it no longer has a submodule to test on that branch. The master branch is still there though and has the async submodule to test, so this commit specifies that branch.
Instead of assuming "master" is always the branch we want, these changes allow for taking whatever default branch the GitHub repo specifies. This supports initiatives like the move to "main" as the default branch name.
@codecov-commenter
Copy link

Codecov Report

Merging #370 into master will increase coverage by 0.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   71.82%   72.00%   +0.17%     
==========================================
  Files          12       12              
  Lines         323      325       +2     
==========================================
+ Hits          232      234       +2     
  Misses         80       80              
  Partials       11       11              
Impacted Files Coverage Δ
project/git.go 92.55% <100.00%> (+0.16%) ⬆️

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 e33e3ac...e0e0999. Read the comment docs.

@caarlos0 caarlos0 merged commit fe5b75a into getantibody:master Sep 3, 2020
@caarlos0
Copy link
Member

caarlos0 commented Sep 3, 2020

Many thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants