Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-10 Thread Junio C Hamano
"Keller, Jacob E" writes: > On Thu, 2014-07-10 at 15:34 -0400, Jeff King wrote: >> On Thu, Jul 10, 2014 at 10:59:36AM -0700, Junio C Hamano wrote: >> >> > Jeff King writes: >> > >> > > I know this is existing code you are moving, but I noticed it looks ripe >> > > for using skip_prefix. Perhap

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-10 Thread Keller, Jacob E
On Thu, 2014-07-10 at 15:34 -0400, Jeff King wrote: > On Thu, Jul 10, 2014 at 10:59:36AM -0700, Junio C Hamano wrote: > > > Jeff King writes: > > > > > I know this is existing code you are moving, but I noticed it looks ripe > > > for using skip_prefix. Perhaps while we are in the area we should

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-10 Thread Keller, Jacob E
On Thu, 2014-07-10 at 00:07 -0400, Jeff King wrote: > On Wed, Jul 09, 2014 at 03:36:51PM -0700, Jacob Keller wrote: > > > +static int parse_sort_string(const char *arg) > > +{ > > + int sort = 0; > > + int flags = 0; > > + > > + if (*arg == '-') { > > + flags |= REVERSE_SORT; > > +

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-10 Thread Jeff King
On Thu, Jul 10, 2014 at 10:59:36AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I know this is existing code you are moving, but I noticed it looks ripe > > for using skip_prefix. Perhaps while we are in the area we should do the > > following on top of your patch (I'd also be happy fo

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-10 Thread Junio C Hamano
Jeff King writes: > I know this is existing code you are moving, but I noticed it looks ripe > for using skip_prefix. Perhaps while we are in the area we should do the > following on top of your patch (I'd also be happy for it be squashed > in, but that may be too much in one patch). I am tempte

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 03:36:51PM -0700, Jacob Keller wrote: > +static int parse_sort_string(const char *arg) > +{ > + int sort = 0; > + int flags = 0; > + > + if (*arg == '-') { > + flags |= REVERSE_SORT; > + arg++; > + } > + if (starts_with(arg, "vers

Re: [PATCH v2] tag: support configuring --sort via .gitconfig

2014-07-09 Thread Jeff King
On Wed, Jul 09, 2014 at 03:36:51PM -0700, Jacob Keller wrote: > Add support for configuring default sort ordering for git tags. Command > line option will override this configured value, using the exact same > syntax. Thanks, this version looks pretty good to me. A few minor comments: > + if