Re: Support customized reordering in version sort

2015-02-20 Thread Junio C Hamano
Junio C Hamano writes: > You can define values to optional negatives and optional positives to > express a more > elaborate sort order e.g. > > 1.0-pre12 < 1.0-rc0 < 1.0 < 1.0-post1 > > even though "-post" does not have to be declared as optional positive. ... that is, you say "-pre" is a more

Re: Support customized reordering in version sort

2015-02-20 Thread Junio C Hamano
On Fri, Feb 20, 2015 at 7:33 PM, Duy Nguyen wrote: > On Sat, Feb 21, 2015 at 10:25 AM, Junio C Hamano wrote: >> On Fri, Feb 20, 2015 at 7:02 PM, Duy Nguyen wrote: >>> >>> My idea is to make it easy for the user to change the sort algorithm. >>> And it's probably intuitive to just substitute a st

Re: Support customized reordering in version sort

2015-02-20 Thread Duy Nguyen
On Sat, Feb 21, 2015 at 10:25 AM, Junio C Hamano wrote: > On Fri, Feb 20, 2015 at 7:02 PM, Duy Nguyen wrote: >> >> My idea is to make it easy for the user to change the sort algorithm. >> And it's probably intuitive to just substitute a string with >> something. So if "1-rc1" is put incorrectly b

Re: Support customized reordering in version sort

2015-02-20 Thread Junio C Hamano
On Fri, Feb 20, 2015 at 7:02 PM, Duy Nguyen wrote: > > My idea is to make it easy for the user to change the sort algorithm. > And it's probably intuitive to just substitute a string with > something. So if "1-rc1" is put incorrectly before "1.1" and you > realize that "1.999" ought to be the last

Support customized reordering in version sort

2015-02-20 Thread Duy Nguyen
On Fri, Feb 20, 2015 at 12:26:29AM -0800, Junio C Hamano wrote: > On Thu, Feb 19, 2015 at 11:13 PM, Jeff King wrote: > > >> There is debian bug 777690 [1] that's basically about making tag's > >> version sort aware about -rc, -pre suffixes. I imagine it would touch > >> versioncmp.c and builtin/t