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

Registering fails when you mention a tag #339

Closed
nkottary opened this issue Jun 16, 2021 · 4 comments · Fixed by #340
Closed

Registering fails when you mention a tag #339

nkottary opened this issue Jun 16, 2021 · 4 comments · Fixed by #340

Comments

@nkottary
Copy link
Member

This is after #335 was merged.

As pointed out in that PR we need the origin/ prefix for git rev-parse so that we can get the tree SHA for non-default branches. It does not work however when we use a tag. For example origin/v0.4. So to solve this issue I think we should have two input fields one for Tag and another for Branch instead of having both in the same field. So now when we get a Tag we prefix with tags/. For example, tags/v0.4 which works.

@StefanKarpinski
Copy link
Contributor

If we make a bare mirror clone of the upstream repo then we would get all of the branches, tags, etc.

@StefanKarpinski
Copy link
Contributor

Even without that, it seems better to try and see if somethings works as a tag and if that fails then try it as a branch, rather than complicating the UI further.

@nkottary
Copy link
Member Author

nkottary commented Jun 17, 2021

Thanks! --bare gives us what we need. There is also --mirror as you pointed out. In addtion to remote branches and tags which --bare gives us, --mirror gives all refs as well but I don't know if we need that.

@StefanKarpinski
Copy link
Contributor

Yes, bare seems sufficient. I can never remember what the difference is.

nkottary added a commit that referenced this issue Jun 21, 2021
Doing a bare git clone:
* Makes all the remote branches local
* Gives us all the tags

Its also slightly faster than just clone.
This will fix #339 and also correctly fixes what #335 tried to fix
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

Successfully merging a pull request may close this issue.

2 participants