From: Jeff King Date: Wed, 26 Feb 2014 11:08:04 GMT Subject: Re: [PATCH v3] tag: support --sort= Message-ID: <20140226110803.GG25711@sigill.intra.peff.net> In-Reply-To: On Wed, Feb 26, 2014 at 06:03:40PM +0700, Duy Nguyen wrote: > > Cool. I think doing this makes the most sense, as we do not have to > > worry about build-time config (and I do not see any particular reason > > why we would want to use the system strverscmp on glibc systems). > > Another reason I want to stay away from glibc is I want to fix the > algorithm to sort YY-preXX and YY-rcXX before YY. There could be > reasons that glibc might reject such a change even if it makes sense > in our context. Even if we make it to newer glibc and fix compat > version, people on older glibc will not receive the fix while people > on compat do. Not so good. Yeah, the handling of -rc has bugged me, too (in my personal alias, I just grep out the -rc before feeding the list to "sort -V" :) ). I'd worry slightly, though, that there are other schemes where that behaves poorly. Should we optimize for git's version numbering, or for what most other projects want? There could even be room for two types of version-compare. But before thinking about that, I'd want to know why glibc behaves as it does. -Peff