Git Product home page Git Product logo

Comments (6)

gibfahn avatar gibfahn commented on September 25, 2024

It will be important to ensure that brew update, brew update-reset and brew test-bot all behave as expected.

To confirm, "behave as expected" here means that e.g. brew update will seamlessly move the tap branch from master -> main right? if I recall correctly last time I tried this it instead errored and asked you to run brew tap --repair, which seems like something brew could handle for you.

https://github.com/homebrew/brew/blob/0a358b851875d8fe070396a7870a7f9b0dfc1634/Library/Homebrew/cmd/update-report.rb#L263-L269

from brew.

Bo98 avatar Bo98 commented on September 25, 2024

Ideally yeah. And if any fixes are required, it may mean having to keep a copy of master around indefinitely as an intermediate update step.

If it doesn't work well, a local symbolic-ref might be an alternative idea.

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on September 25, 2024

To confirm, "behave as expected" here means that e.g. brew update will seamlessly move the tap branch from master -> main right?

Yes.

And if any fixes are required, it may mean having to keep a copy of master around indefinitely as an intermediate update step.

Ideally we don't want to do this but agreed it's worth doing if needed (at least on Homebrew/brew).

from brew.

unitof avatar unitof commented on September 25, 2024

In the past, third party taps handled this with opoo but a silent method for renaming the main (or any) branch which doesn't require keeping the old branch around would be welcome.

from brew.

rrotter avatar rrotter commented on September 25, 2024

Noting the "help wanted" tag, I'm interested in working on this, but I'm not clear what the action item is, or at least not what work there is that a non-maintainer could do (i.e. I clearly won't be renaming your repos on GitHub).

I tried renaming the main branch on a personal tap: brew update detects the rename, and recommends running brew tap --repair, which in turn works perfectly for correcting the refs in the tap.

Is the next step just adding logic to brew update to run brew tap --repair (or the equivalent ruby command) automatically when a branch rename is detected?

edit: I guess I should say that tap --repair works almost perfectly. After the rename there is still a ref left behind to remotes/origin/oldname, which git remote prune origin fixes.

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on September 25, 2024

Is the next step just adding logic to brew update to run brew tap --repair (or the equivalent ruby command) automatically when a branch rename is detected?

Thanks for asking @rrotter! Yes, I think so. brew update should be able to handle these changes and run the relevant commands automatically for users with no intervention (although perhaps an ohai notifying them of the default branch change.

When you've verified this with some test personal taps: we can start moving some of the lesser used Homebrew official taps over.

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.