Skip to content

Hash length #47

@sergeevabc

Description

@sergeevabc

Dear @mdomke,

why the hash value returned by git-semver is one char longer that git? It created a confusion among users a few times because they were comparing the last couple of chars with their eyes.

$ git describe --tags
v2.0.2-3-g1638772

$ git-simver
v2.0.3-dev.3+16387723

$ python -c "a,b = '1638772','16387723'; diff = abs(len(a) - len(b)); print(f'{max(a, b, key=len)} is longer by {diff}' if diff else f'{a} and {b} are equal')"
16387723 is longer by 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions