Git describe shows 0.43.0 on master

Everything about development and the OpenMW source code.
User avatar
Thunderforge
Posts: 477
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Git describe shows 0.43.0 on master

Post by Thunderforge » 05 Aug 2018, 22:10

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: 404
Joined: 22 Feb 2016, 20:32

Re: Git describe shows 0.43.0 on master

Post by Capostrophic » 05 Aug 2018, 22:16

OpenMW 0.44.0 tag wasn't annotated like previous releases, so git describe ignores it. zini plz fix dis
shitty lingua anglica grammar ftw

User avatar
raevol
Posts: 2743
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol » 06 Aug 2018, 00:09

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: 204
Joined: 09 May 2015, 13:07

Re: Git describe shows 0.43.0 on master

Post by wareya » 06 Aug 2018, 04:39

You have to manually push tags.
paying attention to #1751/#1816 #2473 #3609 #3862/#3929 #3807 #4297

User avatar
raevol
Posts: 2743
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol » 06 Aug 2018, 06:53

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: 794
Joined: 15 Aug 2011, 14:56

Re: Git describe shows 0.43.0 on master

Post by Ace (SWE) » 06 Aug 2018, 09:17

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: 4077
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Git describe shows 0.43.0 on master

Post by psi29a » 06 Aug 2018, 17:30

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
ap0
Posts: 265
Joined: 11 Aug 2011, 18:47
Contact:

Re: Git describe shows 0.43.0 on master

Post by ap0 » 06 Aug 2018, 18:00

You might want to add

Code: Select all

git push --tags
to your release process :)

User avatar
raevol
Posts: 2743
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Git describe shows 0.43.0 on master

Post by raevol » 06 Aug 2018, 19:46

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://mickeylyle@github.com': 
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: 404
Joined: 22 Feb 2016, 20:32

Re: Git describe shows 0.43.0 on master

Post by Capostrophic » 06 Aug 2018, 20:07

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).
shitty lingua anglica grammar ftw

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests