Giter Club home page Giter Club logo

Comments (7)

vitorgalvao avatar vitorgalvao commented on June 4, 2024

The branch exists. Delete it and try again.

from tiny-scripts.

wojciech-milewski avatar wojciech-milewski commented on June 4, 2024

I have done it several times - manually and with cask-repair --push MilusW --delete-branches. Still the same output.

cask-repair is able to successfully push new branch to my repository, commit changes, but it is unable to create pull request.

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 4, 2024

Edit your local copy of cask-repair and make the line 393 read git push -u "${remote_push}" "${cask_branch}" --quiet instead of git push "${remote_push}" "${cask_branch}" --quiet.

If that doesn’t work, I’ll have to abandon diagnosing it, as I cannot reproduce. Like in #20, I’ve spent a lot of time on this already, and it was all a waste. What I cannot reproduce I cannot fix unless I am given the cause (which was the case with that issue).

from tiny-scripts.

wojciech-milewski avatar wojciech-milewski commented on June 4, 2024

Unfortunately, it doesn't work. Thank you anyway

from tiny-scripts.

vitorgalvao avatar vitorgalvao commented on June 4, 2024

Thank you for reporting it. If you can get closer to the reason it is happening, I’ll take a look at it, but I’ve pretty much exhausted all the blind suggestions in #20. This is particularly hard to fix since hub seems to be the main culprit.

from tiny-scripts.

jbylsma avatar jbylsma commented on June 4, 2024

Sorry if I'm just adding noise by reopening. I had successfully used cask-repair previously, but today was having the same issues trying to update a different formula.

I think I narrowed down the issue to upstream handling in git branch, line 394. I exited the script after the failure and did some inspection. I was able to set origin as an upstream without a problem, and master was automatically used as the tracking branch. However, specifying my jbylsma remote would not work, returning

[/usr/local/Library/Taps/caskroom/homebrew-cask/Casks]
jbylsma$ git branch --set-upstream-to=jbylsma
error: the requested upstream branch 'jbylsma' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.

I reran the git branch using dtrace and noticed that there was a failed call to the remote's HEAD:

47746/0x392b1:  lstat64(".git/refs/remotes/jbylsma/HEAD\0", 0x7FFF548E6C70, 0x1000)              = -1 Err#2

origin still had it's HEAD, which is probably why I could switch to it. I'm not sure when I lost or if I ever had HEAD in jbylsma, but maybe that's the root hub issue.

Anyways, if the lack of HEAD is the culprit, the easiest fix is to explicitly set to the upstream to remote/branch. I was able to successfully use cask-repair with the upstream update, and I think the explicit upstream branch shouldn't cause any problems. I'll open a pull request with the change for review.

from tiny-scripts.

antonakv avatar antonakv commented on June 4, 2024

I have the same issue. Seems to it was not fixed yet.

from tiny-scripts.

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.