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

[Git Repo] Homebrew formula cannot git clone as HEAD points to master and not the main branch #32

Closed
andrewcrook opened this issue Sep 11, 2023 · 5 comments

Comments

@andrewcrook
Copy link

andrewcrook commented Sep 11, 2023

Homebrew formula fails to clone this repo

Installing cowsay-files
the git clone fails it still looks for the master branch when the cow-files repo has been changed to main

fatal: Remote branch master not found in upstream origin
Error: cowsay-files: Failed to download resource "cowsay-files”

Can you please change the repo HEAD to point to main please?

/cowsay-org/homebrew-cowsay/Formula/cowsay-files.rb

image
@paulkaefer
Copy link
Owner

Hi @andrewcrook. I don't belong to @cowsay-org. Tagging @apjanke as the developer of the file you linked.

I'm closing this, as no changes are required here.

@paulkaefer
Copy link
Owner

@andrewcrook the default branch here is main. I see --branch master in your code snippet, so there must be somewhere that is assuming master is the default branch.
Screenshot 2023-09-11 at 1 33 29 PM

@paulkaefer
Copy link
Owner

@andrewcrook a quick skim of https://docs.brew.sh/Formula-Cookbook suggests there are ways to specify which branch the homebrew formula uses. Please open an issue or PR in https://github.com/cowsay-org/homebrew-cowsay!

@andrewcrook
Copy link
Author

andrewcrook commented Sep 11, 2023

@paulkaefer

Apologies, brew is working different to what I expected I thought HEAD referred to --HEAD which should use the default branch i.e the HEAD ref being main on this repo seems that brew forces master. Anyway I have created a pull request that fixes it. Thanks.

@apjanke
Copy link
Contributor

apjanke commented Sep 14, 2023

Yep, I'm the right contact for @cowsay-org and that https://github.com/cowsay-org/homebrew-cowsay repo. Thanks for the referral here.

Merged a fix for this from cowsay-org/homebrew-cowsay#1, using andrewcrook's fix. Looks to me like Homebrew's brew tool assumes that the default branch for "HEAD" formula's source repos is "master" and can't handle a default branch named "main", even though that's common these days. (Or maybe my original formula was obsolete in some way.)

Thanks, y'all!

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

No branches or pull requests

3 participants