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

How to handle ambiguous refname #53

Closed
elijahmorg opened this issue Sep 29, 2023 · 3 comments
Closed

How to handle ambiguous refname #53

elijahmorg opened this issue Sep 29, 2023 · 3 comments

Comments

@elijahmorg
Copy link

I am working on merging multiple long lived repos together.

Unfortunately in many places they have a branch name and tag with the same name. This causes this warning/error to be thrown

warning: refname 'reponame/branchname' is ambiguous.
fails here2?
warning: refname 'reponame/branchanme' is ambiguous.
fatal: sha1commithash is not a valid 'commit' object

The the fails here2? print comes after this line.
https://github.com/hraban/tomono/blob/master/tomono#L73

Is there a programmatic way to handle this?

I started looking at this and trying to use "refs/heads/" in order to use the fully qualified branch name, but I don't understand this well enough yet to get that to work.
https://stackoverflow.com/questions/28192422/git-warning-refname-xxx-is-ambiguous

hraban added a commit that referenced this issue Sep 29, 2023
@hraban
Copy link
Owner

hraban commented Sep 29, 2023

Close--it's refs/remotes/...

@hraban hraban closed this as completed in 519592c Sep 29, 2023
@elijahmorg
Copy link
Author

The updated script worked! Many thanks.

@hraban
Copy link
Owner

hraban commented Oct 2, 2023

Thank you for the tip 🙏

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

2 participants