Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Jeff King
On Fri, Jan 19, 2018 at 10:47:57AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > I also think %(deltabase) does make sense for anything that points to an > > object. I suspect it's not all that _useful_ for for-each-ref, but that > > doesn't mean we can't return the

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Junio C Hamano
Jeff King writes: > I also think %(deltabase) does make sense for anything that points to an > object. I suspect it's not all that _useful_ for for-each-ref, but that > doesn't mean we can't return the sensible thing if somebody asks for it. This may not be a new issue (or any

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Christian Couder
On Fri, Jan 19, 2018 at 6:22 PM, Оля Тележная wrote: > 2018-01-19 20:14 GMT+03:00 Christian Couder : >> On Thu, Jan 18, 2018 at 7:20 AM, Оля Тележная >> wrote: >>> And another thoughts here - we were thinking about

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Christian Couder
On Fri, Jan 19, 2018 at 6:23 PM, Jeff King wrote: > On Fri, Jan 19, 2018 at 06:14:56PM +0100, Christian Couder wrote: > >> > Let's discuss, what behavior we are waiting for >> > when atom seems useless for the command. Die or ignore? >> >> We could alternatively just emit a

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Jeff King
On Fri, Jan 19, 2018 at 06:14:56PM +0100, Christian Couder wrote: > > Let's discuss, what behavior we are waiting for > > when atom seems useless for the command. Die or ignore? > > We could alternatively just emit a warning, but it looks like there > are a lot of die() calls already in

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Оля Тележная
2018-01-19 20:14 GMT+03:00 Christian Couder : > On Thu, Jan 18, 2018 at 7:20 AM, Оля Тележная > wrote: >> 2018-01-18 1:39 GMT+03:00 Christian Couder : >>> On Wed, Jan 17, 2018 at 10:43 PM, Jeff King

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Christian Couder
On Thu, Jan 18, 2018 at 7:20 AM, Оля Тележная wrote: > 2018-01-18 1:39 GMT+03:00 Christian Couder : >> On Wed, Jan 17, 2018 at 10:43 PM, Jeff King wrote: >>> On Tue, Jan 16, 2018 at 09:55:22AM +0300, Оля Тележная wrote: >>>

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Christian Couder
On Fri, Jan 19, 2018 at 1:24 PM, Оля Тележная wrote: > 2018-01-18 17:23 GMT+03:00 Christian Couder : >> On Thu, Jan 18, 2018 at 12:49 PM, Оля Тележная >> wrote: >>> 2018-01-18 9:20 GMT+03:00 Оля Тележная

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-19 Thread Оля Тележная
2018-01-18 17:23 GMT+03:00 Christian Couder : > On Thu, Jan 18, 2018 at 12:49 PM, Оля Тележная > wrote: >> 2018-01-18 9:20 GMT+03:00 Оля Тележная : >>> >>> I think it's important to finish migrating process at first.

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-18 Thread Christian Couder
On Thu, Jan 18, 2018 at 12:49 PM, Оля Тележная wrote: > 2018-01-18 9:20 GMT+03:00 Оля Тележная : >> >> I think it's important to finish migrating process at first. I mean, >> now we are preparing and collecting everything in ref-filter, but we

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-18 Thread Оля Тележная
2018-01-18 9:20 GMT+03:00 Оля Тележная : > 2018-01-18 1:39 GMT+03:00 Christian Couder : >> On Wed, Jan 17, 2018 at 10:43 PM, Jeff King wrote: >>> On Tue, Jan 16, 2018 at 09:55:22AM +0300, Оля Тележная wrote: >>> > IOW, the

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-17 Thread Оля Тележная
2018-01-18 1:39 GMT+03:00 Christian Couder : > On Wed, Jan 17, 2018 at 10:43 PM, Jeff King wrote: >> On Tue, Jan 16, 2018 at 09:55:22AM +0300, Оля Тележная wrote: >> >>> > IOW, the progression I'd expect in a series like this is: >>> > >>> > 1. Teach

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-17 Thread Christian Couder
On Wed, Jan 17, 2018 at 10:43 PM, Jeff King wrote: > On Tue, Jan 16, 2018 at 09:55:22AM +0300, Оля Тележная wrote: > >> > IOW, the progression I'd expect in a series like this is: >> > >> > 1. Teach ref-filter.c to support everything that cat-file can do. >> > >> > 2. Convert

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-17 Thread Jeff King
On Tue, Jan 16, 2018 at 09:55:22AM +0300, Оля Тележная wrote: > > IOW, the progression I'd expect in a series like this is: > > > > 1. Teach ref-filter.c to support everything that cat-file can do. > > > > 2. Convert cat-file to use ref-filter.c. > > I agree, I even made this and it's

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-15 Thread Оля Тележная
2018-01-16 0:42 GMT+03:00 Jeff King : > On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote: > >> Make valid_atom as a function parameter, >> there could be another variable further. >> Need that for further reusing of formatting logic in cat-file.c. >> >> We do not need

Re: [PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-15 Thread Jeff King
On Wed, Jan 10, 2018 at 09:36:41AM +, Olga Telezhnaya wrote: > Make valid_atom as a function parameter, > there could be another variable further. > Need that for further reusing of formatting logic in cat-file.c. > > We do not need to allow users to pass their own valid_atom variable in >

[PATCH v2 03/18] ref-filter: make valid_atom as function parameter

2018-01-10 Thread Olga Telezhnaya
Make valid_atom as a function parameter, there could be another variable further. Need that for further reusing of formatting logic in cat-file.c. We do not need to allow users to pass their own valid_atom variable in global functions like verify_ref_format because in the end we want to have same