diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-02-27 16:56:52 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-28 02:04:05 +0400 |
commit | 9ef176b55c373ba087b2d84e77b5713578891927 (patch) | |
tree | a722c05ca54a4573a91076d04a4d47a60680bfd5 /Documentation/git-tag.txt | |
parent | 5f95c9f850b19b368c43ae399cc831b17a26a5ac (diff) |
tag: support --sort=<spec>
--sort=version:refname (or --sort=v:refname for short) sorts tags as
if they are versions. --sort=-refname reverses the order (with or
without ":version").
versioncmp() is copied from string/strverscmp.c in glibc commit
ee9247c38a8def24a59eb5cfb7196a98bef8cfdc, reformatted to Git coding
style. The implementation is under LGPL-2.1 and according to [1] I can
relicense it to GPLv2.
[1] http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-tag.txt')
-rw-r--r-- | Documentation/git-tag.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 404257df9f..b424a1bc48 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -95,6 +95,12 @@ OPTIONS using fnmatch(3)). Multiple patterns may be given; if any of them matches, the tag is shown. +--sort=<type>:: + Sort in a specific order. Supported type is "refname" + (lexicographic order), "version:refname" or "v:refname" (tag + names are treated as versions). Prepend "-" to reverse sort + order. + --column[=<options>]:: --no-column:: Display tag listing in columns. See configuration variable |