Skip to content

ads-github-merge-all-upstreams: use 'git push origin heads/<BRANCH>' to avoid ambiguity with tags of the same name as <BRANCH> #16

@salewski

Description

@salewski

If a repo happens to have a tag named the same as the default branch, then
you'll get an error similar to the following when attempting to push the
changes back to origin (using the '-p' (--push) option to
ads-github-merge-all-upstreams):

ads-github-merge-all-upstreams (info): [repo: "whatever-repo"] '-p' (--push) option specified; attempting to push default branch ("master") changes to origin
error: src refspec master matches more than one.
error: failed to push some refs to 'git@github.com:someuser/whatever-repo.git'
ads-github-merge-all-upstreams (error): [repo: "whatever-repo"]: was unable to push default branch ("master") changes to origin; bailing out

The problem is that we're using an invocation of git push similar to:

    $ git push --tags origin <BRANCH>

We should tighten that up to use the form:

    $ git push --tags origin heads/<BRANCH>

to avoid ambiguity and prevent the above error.

Metadata

Metadata

Assignees

Labels

resolution:fixedRead as "fixed OR done OR implemented OR answered"status:resolvedtype:ideaIdeas for enhancements or better ways of doing things

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions