Skip to content

Incompatibility with git describe --tags #106

@isaacs

Description

@isaacs

Create a tag in git called 1.0.0.

Make 5 more commits.

Run git describe --tags. Output will be something like 1.0.0-5-feedcat.

Make 7 more commits, and run it again. Output will be something like 1.0.0-12-deadbeef.

It seems like 1.0.0-12-deadbeef should be > 1.0.0-5-feedcat. However, since only periods separate prerelease identifiers, and any identifier with hyphens is compared alphabetically, this won't be the case.

The fact that the semver 2.0 spec is not compatible with git describe --tags is not so great, in my opinion.

One possible solution would be to split prerelease identifiers by both periods and hyphens.

One bit of oddness that might result is that 1.0.0-asdf-1 would be equal to 1.0.0-asdf.1. But otherwise, it looks like all the existing semantics would be equivalent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions