hraban / tomono

Multi- To Mono-repository merge
https://tomono.0brg.net
GNU Affero General Public License v3.0
842 stars 138 forks source link

How to handle ambiguous refname #53

Closed elijahmorg closed 11 months ago

elijahmorg commented 11 months ago

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 commented 11 months ago

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

elijahmorg commented 10 months ago

The updated script worked! Many thanks.

hraban commented 10 months ago

Thank you for the tip 🙏