Skip to content

Add git_version_count as a way to get the number of commits since HEAD #18

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

Closed

Conversation

svenstaro
Copy link

I found that this is sometimes quite helpful when you can't use a hash for your version such as in Android apps.

@hoijui
Copy link

hoijui commented Nov 3, 2023

I don't understand why "number of commits since HEAD" is interesting; in which cases would that not be 0?

@hoijui

This comment was marked as outdated.

@de-vri-es
Copy link
Collaborator

Agreed, HEAD is always your last commit :o

@de-vri-es
Copy link
Collaborator

Note that git describe can already print commit since the last tag. This isn't the total number of commits, but it should be good enough for git_version!().

Feel free to reply if I misunderstood the point. I can re-open the issue.

@de-vri-es de-vri-es closed this Nov 15, 2023
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 this pull request may close these issues.

3 participants