Git describe shows 0.43.0 on master
- Thunderforge
- Posts: 503
- Joined: 06 Jun 2017, 05:57
Git describe shows 0.43.0 on master
When I have the latest code and run git describe in the Terminal, I get openmw-0.43.0-1196-gb75b5d139. Shouldn't it start off with openmw-0.44.0?
- Capostrophic
- Posts: 794
- Joined: 22 Feb 2016, 20:32
Re: Git describe shows 0.43.0 on master
OpenMW 0.44.0 tag wasn't annotated like previous releases, so git describe ignores it. zini plz fix dis
Re: Git describe shows 0.43.0 on master
That'd be my fault- what did I mess up? I put the tag on the latest commit on the 0.44 branch, which obviously is not master. I'm not sure what the correct action would have been though, I'm not very good with git.
Re: Git describe shows 0.43.0 on master
You have to manually push tags.
Re: Git describe shows 0.43.0 on master
Tags and branches are just different types of git refs, tags are not branch-specific but rather global to the repository and linked to a particular commit.
You also have lightweight tags and annotated tags, lightweight tags are quite literally just a name linked to a commit hash, annotated tags on the other hand have additional information added to them - messages, signatures, etc.
It this case, I assume that the 0.44.0 tag was created as a lightweight tag, when it should've been an annotated tag.
You also have lightweight tags and annotated tags, lightweight tags are quite literally just a name linked to a commit hash, annotated tags on the other hand have additional information added to them - messages, signatures, etc.
It this case, I assume that the 0.44.0 tag was created as a lightweight tag, when it should've been an annotated tag.
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Git describe shows 0.43.0 on master
man git-tag says:
Lightweight tags don't have that extra information, and don't need it, since you are only going to use it yourself to develop.
git push --follow-tags will only push annotated tags
git describe without command line options only sees annotated tags
Found this:
annotated tags can contain a message, creator, and date different than the commit they point to. So you could use them to describe a release without making a release commit.Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels.
Lightweight tags don't have that extra information, and don't need it, since you are only going to use it yourself to develop.
git push --follow-tags will only push annotated tags
git describe without command line options only sees annotated tags
Found this:
As of Git v1.8.2, you need to use --force to replace any tags on a remote with git push, even if you are replacing a lightweight tag with something that is effectively a fast-forward or a true tag object pointing at the same commit as the existing tag reference.
git push --force origin <tagname>
Re: Git describe shows 0.43.0 on master
You might want to add to your release process :)
Code: Select all
git push --tags
Re: Git describe shows 0.43.0 on master
Code: Select all
raevol@jabberwock:~/Development/openmw$ git checkout openmw-44
Switched to branch 'openmw-44'
Your branch is up to date with 'origin/openmw-44'.
raevol@jabberwock:~/Development/openmw$ git push --tags
Username for 'https://github.com': mickeylyle
Password for 'https://[email protected]':
To https://github.com/Openmw/openmw.git
! [rejected] openmw-0.42.0 -> openmw-0.42.0 (already exists)
! [rejected] stable -> stable (already exists)
error: failed to push some refs to 'https://github.com/Openmw/openmw.git'
hint: Updates were rejected because the tag already exists in the remote.
raevol@jabberwock:~/Development/openmw$
- Capostrophic
- Posts: 794
- Joined: 22 Feb 2016, 20:32
Re: Git describe shows 0.43.0 on master
Code: Select all
! [rejected] openmw-0.42.0 -> openmw-0.42.0 (already exists)
! [rejected] stable -> stable (already exists)
error: failed to push some refs to 'https://github.com/Openmw/openmw.git'
hint: Updates were rejected because the tag already exists in the remote.