Git describe shows 0.43.0 on master

Everything about development and the OpenMW source code.
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Git describe shows 0.43.0 on master

Post by Thunderforge »

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?
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Git describe shows 0.43.0 on master

Post by Capostrophic »

OpenMW 0.44.0 tag wasn't annotated like previous releases, so git describe ignores it. zini plz fix dis
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol »

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.
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Git describe shows 0.43.0 on master

Post by wareya »

You have to manually push tags.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol »

wareya wrote: 06 Aug 2018, 04:39 You have to manually push tags.
I pushed them to the 0.44 branch. Does the branch need to be merged into master? Sorry, you need to walk me through this a little.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Git describe shows 0.43.0 on master

Post by Ace (SWE) »

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.
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Git describe shows 0.43.0 on master

Post by psi29a »

man git-tag says:
Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels.
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.

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>
User avatar
jvoisin
Posts: 303
Joined: 11 Aug 2011, 18:47
Contact:

Re: Git describe shows 0.43.0 on master

Post by jvoisin »

You might want to add

Code: Select all

git push --tags
to your release process :)
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol »

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$ 
Did that do it?
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Git describe shows 0.43.0 on master

Post by Capostrophic »

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.
You can tell that it didn't (and it really didn't).
Post Reply