[PATCH v4] tag: support --sort=spec

2014-02-27 Thread Nguyễn Thái Ngọc Duy
--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

Re: [PATCH v4] tag: support --sort=spec

2014-02-27 Thread Jeff King
On Thu, Feb 27, 2014 at 07:56:52PM +0700, Nguyễn Thái Ngọc Duy wrote: --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

Re: [PATCH v4] tag: support --sort=spec

2014-02-27 Thread Duy Nguyen
On Thu, Feb 27, 2014 at 8:11 PM, Jeff King p...@peff.net wrote: You had mentioned earlier tweaking the version comparison to handle things like -rc better. I think that can come on top of this initial patch, but we should probably figure out the final sort order before including this in a