git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Halil Öztürk" <halilozturk55@gmail.com>
Cc: git@vger.kernel.org, Karthik Nayak <karthik.188@gmail.com>
Subject: Re: Feature Request: Passing a number as an option to git tags for displaying latest tags
Date: Wed, 22 Jul 2015 12:20:46 -0700	[thread overview]
Message-ID: <xmqq7fpsroc1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqbnf4rohs.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Wed, 22 Jul 2015 12:17:19 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> The former, sort by "time", is interesting, but you need to define
> what to do with various corner cases.  For example, some people may
> have one or more of the following desires:
>
>  * My project did not use tags for a long time, and started using it
>    recently starting from v1.1.0.  The first release only said
>    "Frotz version 1.0.0" in its commit log message.  I retroactively
>    did "git tag -s -m 'Frotz 1.1.0' v1.1.0" on that commit.

Obviously, I meant "git tag -s -m 'Frotz 1.0.0' v1.0.0" here.

>    In such a case, it is likely that I would want the sorting done
>    based on the committer date on the underlying commit, not the
>    tag's tagger date.
>
>  * When a bug is found, it is customary in my project to add a
>    "break-<something>" tag to the commit that introduces the bug
>    (and "fix-<something>" tag to the commit that fixes it).
>
>    When I want to find recently discovered breakages, I want the
>    tags whose names match "break-*" sorted by tagger dates, not the
>    underlying commit's committer dates.

Another use case may be one in which older tags are interesting.  In
other words, you need to be able to sort in reverse, too.

> The necessary ordering machinery to do the above already exists in
> "for-each-ref".  There is a GSoC project that works to unify various
> features spread across "for-each-ref", "branch -l" and "tag -l" and
> make them available to all of the three.

And the above is still true even with reverse-order use case.

  reply	other threads:[~2015-07-22 19:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 17:17 Feature Request: Passing a number as an option to git tags for displaying latest tags Halil Öztürk
2015-07-22 18:36 ` Jacob Keller
2015-07-22 18:58 ` Andreas Schwab
2015-07-22 19:17 ` Junio C Hamano
2015-07-22 19:20   ` Junio C Hamano [this message]
2015-07-23  9:39     ` Michael J Gruber
2015-07-23 17:21       ` Jacob Keller
2015-07-23 18:01         ` Junio C Hamano
2015-07-23 18:12           ` Jacob Keller
2015-07-23 18:21             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7fpsroc1.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=halilozturk55@gmail.com \
    --cc=karthik.188@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).