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

There is a branch named 2.1.0 and a tag named 2.1.0 and they point at different commits #12016

Closed
ruuda opened this issue Aug 29, 2024 · 5 comments
Labels
community Issues created by community investigation required

Comments

@ruuda
Copy link

ruuda commented Aug 29, 2024

In this repository, there is currently a branch named 2.1.0 and it points at 88075ce, and there is a tag 2.1.0 and it points at 24dbd5f. To confirm this for yourself:

$ git clone https://github.com/near/nearcore.git
$ cd nearcore
$ git rev-parse refs/remotes/origin/2.1.0
88075cec93923701af9fc43760aa41f3fefffa3f

$ git rev-parse refs/tags/2.1.0
24dbd5f8c2bf6071efd4be00fc0c15af5449b6b3

This creates confusion about what 2.1.0 means. Probably the tag is intended to be the source of truth, but without the qualified name, it’s not clear which one Git uses.

The best way to fix this is probably to delete the 2.1.0 branch; the tag is already there.

@jancionear
Copy link
Contributor

jancionear commented Aug 29, 2024

You're right, it looks like three commits meant for 2.1.1 made it onto the 2.1.0 branch by accident.
I think we should remove the last three commits from 2.1.0, and force push a branch that ends at 24dbd5f
/cc @VanBarbascu

@qezz
Copy link

qezz commented Aug 29, 2024

So when one does git checkout 2.1.0, will it eventually end up on the branch or on the tag?

@jancionear
Copy link
Contributor

jancionear commented Aug 29, 2024

So when one does git checkout 2.1.0, will it eventually end up on the branch or on the tag?

Both, the tag and the branch should point to the same commit

@qezz
Copy link

qezz commented Aug 29, 2024

Both, the tag and the branch should point to the same commit

Well, it should, but Git doesn't enforce it. So people may end up thinking that they are building from the same commit, but in reality it's not the case.

@telezhnaya
Copy link
Contributor

Thanks for finding this! Fixed, now they both point to 24dbd5f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues created by community investigation required
Projects
None yet
Development

No branches or pull requests

4 participants