Giter Site home page Giter Site logo

Comments (1)

mtkennerly avatar mtkennerly commented on May 23, 2024 2

Hi! The sorting logic did change a bit between 1.5.0 and 1.5.1, but what you're seeing is ultimately a "feature" of Git's lightweight tags (created by git tag foo). They don't store their own creation timestamp, so when there are multiple of them on a single commit, there's no way to determine which one was created last. If you use annotated tags (git tag foo -m "comment"), then a tag timestamp is saved separately from the commit timestamp, which enables better sorting.

The prior behavior was kind of a happy accident and wasn't guaranteed to happen consistently. Consider what happens when you make rc1 before rc0:

$ git init
Initialized empty Git repository in C:/tmp/d3/.git/

$ touch foo
$ git add .
$ git commit -m Initial
[master (root-commit) 804464f] Initial
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo

$ git tag v0.1.0-rc1
$ git tag v0.1.0-rc0

$ git tag -l
v0.1.0-rc0
v0.1.0-rc1

$ git tag --merged HEAD --sort -creatordate
v0.1.0-rc0
v0.1.0-rc1

$ dunamai from git --latest-tag
0.1.0rc0

In this case, v0.1.0-rc0 is the newest tag, so the output ends up being correct, but not because Dunamai actually knows which one was created more recently.

from dunamai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.