[PATCH v5 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-02-16 Thread Karthik Nayak
Bump code to the top for usage in further patches. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 38f38d4..c3a8372 100644 ---

[PATCH v5 09/12] ref-filter: align: introduce long-form syntax

2016-02-16 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documentation and tests for the same. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by:

[PATCH v5 01/12] strbuf: introduce strbuf_split_str_omit_term()

2016-02-16 Thread Karthik Nayak
without including the terminator. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- strbuf.c | 14 +- strbuf.h | 25 - 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/strbuf.

[PATCH v5 06/12] ref-filter: introduce color_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signe

[PATCH v5 00/12] ref-filter: use parsing functions

2016-02-16 Thread Karthik Nayak
for their comments on the previous version. And everyone else who helped review the previous patch series. Karthik Nayak (12): strbuf: introduce strbuf_split_str_omit_term() ref-filter: use strbuf_split_str_omit_term() ref-filter: bump 'used_atom' and related code to the top ref-filter: introduce

Re: [PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-09 Thread Karthik Nayak
On Sun, Feb 7, 2016 at 7:17 PM, Andreas Schwab <sch...@linux-m68k.org> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> + if ((( arg && len == arg - sp) || >> +(!arg && len == ep - sp )) &&

Re: [PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-07 Thread Karthik Nayak
On Sun, Feb 7, 2016 at 12:03 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sat, Feb 6, 2016 at 10:15 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Sun, Jan 31, 2016 at 11:12 PM, Karthik Nayak <karthik@gmail.com> >> wrote: >>> @@ -

Re: [PATCH v4 06/12] ref-filter: introduce color_atom_parser()

2016-02-07 Thread Karthik Nayak
On Sun, Feb 7, 2016 at 1:13 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sat, Feb 6, 2016 at 10:20 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Fri, Feb 5, 2016 at 3:55 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> On Su

Re: [PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-07 Thread Karthik Nayak
On Sun, Feb 7, 2016 at 12:33 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sat, Feb 6, 2016 at 9:36 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Thu, Feb 4, 2016 at 3:49 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> On Su

Re: [PATCH v4 10/12] ref-filter: introduce remote_ref_atom_parser()

2016-02-06 Thread Karthik Nayak
On Fri, Feb 5, 2016 at 5:35 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 11:12:54PM +0530, Karthik Nayak wrote: >> Introduce remote_ref_atom_parser() which will parse the '%(upstream)' >> and '%(push)' atoms and store information into the 'us

Re: [PATCH v4 06/12] ref-filter: introduce color_atom_parser()

2016-02-06 Thread Karthik Nayak
On Fri, Feb 5, 2016 at 3:55 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 12:42 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce color_atom_parser() which will parse a "color" atom and >> store its color in the &q

Re: [PATCH v4 08/12] ref-filter: introduce align_atom_parser()

2016-02-06 Thread Karthik Nayak
On Fri, Feb 5, 2016 at 5:18 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 12:42 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce align_atom_parser() which will parse an 'align' atom and >> store the required alignment position

Re: [PATCH v4 09/12] ref-filter: align: introduce long-form syntax

2016-02-06 Thread Karthik Nayak
On Fri, Feb 5, 2016 at 5:30 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 12:42 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce optional prefixes "width=" and "position=" for the align atom >> so that t

Re: [PATCH] ref-filter.c: don't stomp on memory

2016-02-06 Thread Karthik Nayak
rst. > Aside from the two proposed fixes, a fix patterned after the original > code which patch 5/12 replaced would be even easier to understand. > That is, something like this: > > arg = memchr(...); > if (!arg) > arg = ep; > if (len == arg - sp && !me

Re: [PATCH v4 11/12] ref-filter: introduce contents_atom_parser()

2016-02-06 Thread Karthik Nayak
On Fri, Feb 5, 2016 at 5:52 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 12:42 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce contents_atom_parser() which will parse the '%(contents)' >> atom and store information into the

Re: [PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-06 Thread Karthik Nayak
On Sun, Jan 31, 2016 at 11:12 PM, Karthik Nayak <karthik@gmail.com> wrote: > @@ -138,10 +140,9 @@ int parse_ref_filter_atom(const char *atom, const char > *ep) > * shouldn't be used for checking against the valid_atom >

Re: [PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-06 Thread Karthik Nayak
On Thu, Feb 4, 2016 at 3:49 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Jan 31, 2016 at 12:42 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Parsing atoms is done in populate_value(), this is repetitive and >> hence expensive. Introduce a parsing

Re: [PATCH v4 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-02-02 Thread Karthik Nayak
On Tue, Feb 2, 2016 at 3:52 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> Bump code to the top for usage in further patches. >> --- > > Sign-off? Shall reply with patch, missed th

[PATCH v4 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-02-02 Thread Karthik Nayak
Bump code to the top for usage in further patches. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 38f38d4..c3a8372 100644 ---

Re: [PATCH v4 10/12] ref-filter: introduce remote_ref_atom_parser()

2016-02-01 Thread Karthik Nayak
esource Karthik > accidentally included in the commit (which has been stripped from > this re-send). > Thanks a lot, wondering how that happened. > On Sun, Jan 31, 2016 at 11:12:54PM +0530, Karthik Nayak wrote: >> Introduce remote_ref_atom_parser() which will parse the '%(upstream)'

Re: [PATCH v4 00/12] ref-filter: use parsing functions

2016-02-01 Thread Karthik Nayak
On Tue, Feb 2, 2016 at 6:07 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Mon, Feb 1, 2016 at 5:25 PM, Junio C Hamano <gits...@pobox.com> wrote: >> Karthik Nayak <karthik@gmail.com> writes: >> >>> This series cleans up populate_value() in

[PATCH v4 00/12] ref-filter: use parsing functions

2016-01-31 Thread Karthik Nayak
of test (t6302). Karthik Nayak (12): strbuf: introduce strbuf_split_str_omit_term() ref-filter: use strbuf_split_str_omit_term() ref-filter: bump 'used_atom' and related code to the top ref-filter: introduce struct used_atom ref-filter: introduce parsing functions for each valid atom ref

[PATCH v4 01/12] strbuf: introduce strbuf_split_str_omit_term()

2016-01-31 Thread Karthik Nayak
without including the terminator. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- strbuf.c | 14 +- strbuf.h | 25 - 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/strbuf.

[PATCH v4 09/12] ref-filter: align: introduce long-form syntax

2016-01-31 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documentation and tests for the same. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by:

[PATCH v4 04/12] ref-filter: introduce struct used_atom

2016-01-31 Thread Karthik Nayak
Introduce the 'used_atom' structure to replace the existing implementation of 'used_atom' (which is a list of atoms). This helps us parse atoms beforehand and store required details into the 'used_atom' for future usage. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: K

[PATCH v4 08/12] ref-filter: introduce align_atom_parser()

2016-01-31 Thread Karthik Nayak
-by: Eric Sunshine <sunsh...@sunshineco.com> Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 91 ++-- 1 file changed, 40 insertions(+), 51 deletions(-)

[PATCH v4 06/12] ref-filter: introduce color_atom_parser()

2016-01-31 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signe

[PATCH v4 07/12] ref-filter: introduce parse_align_position()

2016-01-31 Thread Karthik Nayak
>From populate_value() extract parse_align_position() which given a string would give us the alignment position. This is a preparatory patch as to introduce prefixes for the %(align) atom and avoid redundancy in the code. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by

[PATCH v4 12/12] ref-filter: introduce objectname_atom_parser()

2016-01-31 Thread Karthik Nayak
; Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 35 --- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index b2043a0..d48e2a3 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -43,6 +43,

[PATCH v4 11/12] ref-filter: introduce contents_atom_parser()

2016-01-31 Thread Karthik Nayak
. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 77 ++-- 1 file changed, 49 insertions(+), 28

[PATCH v4 05/12] ref-filter: introduce parsing functions for each valid atom

2016-01-31 Thread Karthik Nayak
ed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 3736dc3..92b4419 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -36,6 +36,7 @@ static int need_color_reset_at_

[PATCH v4 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-01-31 Thread Karthik Nayak
Bump code to the top for usage in further patches. --- ref-filter.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 38f38d4..c3a8372 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -16,6 +16,21 @@ typedef

[PATCH v4 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-01-31 Thread Karthik Nayak
Use the newly introduced strbuf_split_str_omit_term() rather than using strbuf_split_str() and manually removing the ',' terminator. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 9 + 1 file changed,

Re: [PATCH v3 13/15] ref-filter: introduce remote_ref_atom_parser()

2016-01-26 Thread Karthik Nayak
On Tue, Jan 26, 2016 at 5:58 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tue, Jan 5, 2016 at 3:03 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce remote_ref_atom_parser() which will parse the '%(upstream)' >> and '%(push)' atoms and store info

Re: [PATCH v3 10/15] ref-filter: introduce parse_align_position()

2016-01-26 Thread Karthik Nayak
On Tue, Jan 26, 2016 at 3:19 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tue, Jan 5, 2016 at 3:03 AM, Karthik Nayak <karthik@gmail.com> wrote: >> From align_atom_parser() form parse_align_position() which given a >> string would give us the alignment posi

Re: [PATCH v3 12/15] ref-filter: align: introduce long-form syntax

2016-01-26 Thread Karthik Nayak
On Tue, Jan 26, 2016 at 4:28 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tue, Jan 5, 2016 at 3:03 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce optional prefixes "width=" and "position=" for the align atom >> so that t

Re: [PATCH v3 12/15] ref-filter: align: introduce long-form syntax

2016-01-26 Thread Karthik Nayak
uot;align:$option" " >> git for-each-ref --format='...$option...' >actual && >> ... >> " >> done >> } > > but make it more like this: > > for option in ... > do >

Re: [PATCH v3 12/15] ref-filter: align: introduce long-form syntax

2016-01-26 Thread Karthik Nayak
On Tue, Jan 26, 2016 at 10:46 AM, Christian Couder <christian.cou...@gmail.com> wrote: > On Tue, Jan 5, 2016 at 9:03 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce optional prefixes "width=" and "position=" for the align atom >>

Re: [PATCH 2/2] tag: do not show ambiguous tag names as "tags/foo"

2016-01-25 Thread Karthik Nayak
me to decide what strip= should do in the error case. > > Unfortunately, this means kn/ref-filter-atom-parsing topic from you > that were parked on 'pu' must be ejected for now, as any change in > this area overlaps with it, and the atom parsing code would need to > be updated to l

Re: [PATCH] tag: do not show ambiguous tag names as "tags/foo"

2016-01-25 Thread Karthik Nayak
about a scenario wherein we have refs/branches/abc/foo refs/branches/xyz should --format="%(refname:strip=3)" give us foo xyz (here stripping till 2 '/', which is the maximum) or foo refs/branches/xyz (no stripping done at all) I prefer the former, cause that would allow us t

Re: [PATCH v3 04/15] ref-filter: introduce struct used_atom

2016-01-24 Thread Karthik Nayak
On Fri, Jan 22, 2016 at 12:34 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Tuesday, January 5, 2016, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce the 'used_atom' structure to replace the existing >> implementation of 'used_atom' (which is a list

Re: [PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-24 Thread Karthik Nayak
On Fri, Jan 22, 2016 at 1:17 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Jan 6, 2016 at 2:27 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Wed, Jan 6, 2016 at 12:54 AM, Junio C Hamano <gits...@pobox.com> wrote: >>> Karthik

Re: [PATCH v3 11/15] ref-filter: convert variable 'width' to an unsigned int

2016-01-06 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 2:42 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> In align_atom_parser() the 'width' variable is an int, which requires >> an explicit type conversion when used in strtoul_ui(). He

Re: [PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-06 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 2:36 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> @@ -90,7 +105,7 @@ static struct { >> { "symref" }, >> { "flag" }, >> { "HEAD" }

Re: [PATCH v3 14/15] ref-filter: introduce contents_atom_parser()

2016-01-06 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 2:52 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> Introduce contents_atom_parser() which will parse the '%(contents)' >> atom and store information into the 'used_atom' structure based

Re: [PATCH v3 15/15] ref-filter: introduce objectname_atom_parser()

2016-01-06 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 3:01 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> @@ -467,15 +482,17 @@ static void *get_obj(const unsigned char *sha1, struct >> object **obj, unsigned lo >> } >> >> st

[PATCH v3 13/15] ref-filter: introduce remote_ref_atom_parser()

2016-01-05 Thread Karthik Nayak
<sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 107 --- 1 file changed, 66 insertions(+), 41 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index df0b114..32b4674 100644 --- a/

[PATCH v3 15/15] ref-filter: introduce objectname_atom_parser()

2016-01-05 Thread Karthik Nayak
; Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 9e61530..57b4280 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -43,6 +43,

[PATCH v3 00/15] ref-filter: use parsing functions

2016-01-05 Thread Karthik Nayak
ect' and 'body' in contents_atom_parser() and although Eric suggested I use strcmp() instead, this would not work as we need to check for derefernced 'subject' and 'body' atoms. [0]: http://article.gmane.org/gmane.comp.version-control.git/282701 Karthik Nayak (15): strbuf: introd

[PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signe

[PATCH v3 12/15] ref-filter: align: introduce long-form syntax

2016-01-05 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documetation and tests for the same. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <ka

[PATCH v3 14/15] ref-filter: introduce contents_atom_parser()

2016-01-05 Thread Karthik Nayak
; Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 74 +--- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 32b4674..9e61530 100644 --- a/ref-filter.c +++ b/ref-filter

[PATCH v3 10/15] ref-filter: introduce parse_align_position()

2016-01-05 Thread Karthik Nayak
>From align_atom_parser() form parse_align_position() which given a string would give us the alignment position. This is a preparatory patch as to introduce prefixes for the %(align) atom and avoid redundancy in the code. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by

[PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-05 Thread Karthik Nayak
without including the terminator. Helped-by: Eric Sunshine <sunsh...@sunshineco.com> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- strbuf.c | 7 --- strbuf.h | 25 - 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/strbuf.c b/st

[PATCH v3 05/15] ref-filter: introduce parsing functions for each valid atom

2016-01-05 Thread Karthik Nayak
ed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ref-filter.c b/ref-filter.c index 75ebd03..efa247a 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -36,6 +36,7 @@ static int need_color_reset_at_eol; static struct {

[PATCH v3 09/15] ref-filter: introduce align_atom_parser()

2016-01-05 Thread Karthik Nayak
m> Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 83 +--- 1 file changed, 46 insertions(+), 37 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 9708d67..fa081a8 100644 --- a/ref-filter.c +++ b/ref

Re: [PATCH v3 01/15] strbuf: introduce strbuf_split_str_omit_term()

2016-01-05 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 12:54 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> The current implementation of 'strbuf_split_buf()' includes the >> terminator at the end of each strbuf post splitting. Add an

Re: [PATCH v3 08/15] ref-filter: introduce color_atom_parser()

2016-01-05 Thread Karthik Nayak
On Wed, Jan 6, 2016 at 2:19 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >> Introduce color_atom_parser() which will parse a "color" atom and >> store its color in the "used_atom" structure for

Re: [PATCH v2 08/11] ref-filter: introduce prefixes for the align atom

2015-12-31 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:29 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> ref-filter: introduce prefixes for the align atom > > The prefixes are actually for the ar

Re: [PATCH v2 11/11] ref-filter: introduce objectname_atom_parser()

2015-12-25 Thread Karthik Nayak
On Fri, Dec 25, 2015 at 11:39 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Fri, Dec 25, 2015 at 8:44 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Fri, Dec 18, 2015 at 11:54 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>>

Re: [PATCH v2 11/11] ref-filter: introduce objectname_atom_parser()

2015-12-25 Thread Karthik Nayak
On Fri, Dec 18, 2015 at 11:54 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:30 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce objectname_atom_parser() which will parse the >> '%(objectname)' atom and store info

Re: [PATCH v2 10/11] ref-filter: introduce contents_atom_parser()

2015-12-24 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 3:09 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:30 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce contents_atom_parser() which will parse the '%(contents)' >> atom and store information into the

Re: [PATCH v2 09/11] ref-filter: introduce remote_ref_atom_parser()

2015-12-23 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:52 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:30 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce remote_ref_atom_parser() which will parse the '%(upstream)' >> and '%(push)' atoms and store info

Re: [PATCH v2 07/11] ref-filter: introduce align_atom_parser()

2015-12-19 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 3:24 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce align_atom_parser() which will parse an "align" atom and >> store the required alignmen

Re: [PATCH v2 07/11] ref-filter: introduce align_atom_parser()

2015-12-19 Thread Karthik Nayak
On Fri, Dec 18, 2015 at 11:20 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce align_atom_parser() which will parse an "align" atom and >> store the

Re: [PATCH v2 03/11] ref-filter: introduce struct used_atom

2015-12-18 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:27 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce the 'used_array' structure which would replace the existing >> implementation of 'used_ar

Re: [PATCH v2 05/11] ref-filter: skip deref specifier in match_atom_name()

2015-12-18 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:41 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> In upcoming patches we make calls to match_atom_name() with the '*' >> deref specifier still attached to

Re: [PATCH v2 06/11] ref-filter: introduce color_atom_parser()

2015-12-18 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:51 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce color_atom_parser() which will parse a "color" atom and >> store its color in the &

Re: [PATCH v2 01/11] strbuf: introduce strbuf_split_str_without_term()

2015-12-17 Thread Karthik Nayak
On Thu, Dec 17, 2015 at 2:05 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak <karthik@gmail.com> wrote: >> strbuf: introduce strbuf_split_str_without_term() > > s/without/omit/ > >> The current implementat

Re: [PATCH/RFC 00/10] ref-filter: use parsing functions

2015-12-16 Thread Karthik Nayak
On Mon, Dec 14, 2015 at 3:25 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Dec 13, 2015 at 4:31 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Sun, Dec 13, 2015 at 11:10 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>>

[PATCH v2 00/11] ref-filter: use parsing functions

2015-12-16 Thread Karthik Nayak
et rid of repetitive checks performed. (http://article.gmane.org/gmane.comp.version-control.git/282320). Karthik Nayak (11): strbuf: introduce strbuf_split_str_without_term() ref-filter: use strbuf_split_str_omit_term() ref-filter: introduce struct used_atom ref-fitler: bump match_atom() n

[PATCH v2 04/11] ref-fitler: bump match_atom() name to the top

2015-12-16 Thread Karthik Nayak
Bump match_atom() to the top for usage in further patches. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 043a02a..f4a6414

[PATCH v2 03/11] ref-filter: introduce struct used_atom

2015-12-16 Thread Karthik Nayak
. Using this we can define special parsing functions for each of the atoms. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 63 +++- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/ref-filter.c

[PATCH v2 02/11] ref-filter: use strbuf_split_str_omit_term()

2015-12-16 Thread Karthik Nayak
Use the newly introduced strbuf_split_str_omit_term() rather than using strbuf_split_str() and manually removing the ',' terminator. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ref-filt

[PATCH v2 06/11] ref-filter: introduce color_atom_parser()

2015-12-16 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "use_atom" structure for further usage in 'populate_value()'. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Nayak <karthik@gmai

[PATCH v2 05/11] ref-filter: skip deref specifier in match_atom_name()

2015-12-16 Thread Karthik Nayak
In upcoming patches we make calls to match_atom_name() with the '*' deref specifier still attached to the atom name. This causes undesirable errors, hence, if present skip over the '*' deref specifier in the atom name. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- ref-filter

[PATCH v2 01/11] strbuf: introduce strbuf_split_str_without_term()

2015-12-16 Thread Karthik Nayak
without including the terminator. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- strbuf.c | 7 --- strbuf.h | 25 - 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/strbuf.c b/strbuf.c index b552a13..b62508e 100644 --- a/strbuf.c

[PATCH v2 08/11] ref-filter: introduce prefixes for the align atom

2015-12-16 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documetation and tests for the same. Signed-off-by: Karthik Nayak <karthik@gmail.com> --- Documentation/git-for-ea

[PATCH v2 07/11] ref-filter: introduce align_atom_parser()

2015-12-16 Thread Karthik Nayak
Introduce align_atom_parser() which will parse an "align" atom and store the required alignment position and width in the "use_atom" structure for further usage in 'populate_value()'. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Na

[PATCH v2 11/11] ref-filter: introduce objectname_atom_parser()

2015-12-16 Thread Karthik Nayak
Introduce objectname_atom_parser() which will parse the '%(objectname)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Nayak <karthik@gmail.com&

[PATCH v2 09/11] ref-filter: introduce remote_ref_atom_parser()

2015-12-16 Thread Karthik Nayak
Introduce remote_ref_atom_parser() which will parse the '%(upstream)' and '%(push)' atoms and store information into the 'used_atom' structure based on the modifiers used along with the corresponding atom. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Nayak &l

[PATCH v2 10/11] ref-filter: introduce contents_atom_parser()

2015-12-16 Thread Karthik Nayak
Introduce contents_atom_parser() which will parse the '%(contents)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones <ram...@ramsayjones.plus.com> Signed-off-by: Karthik Nayak <karthik@gmail.com&

Re: [PATCH/RFC 08/10] ref-filter: introduce remote_ref_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 2:15 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sun, Dec 13, 2015 at 3:32 AM, Karthik Nayak <karthik@gmail.com> wrote: >>> On Sun, Dec 13, 2015 at 6:23 AM, Eric Sunshine <sunsh...@sunshineco.com> >>> wrote: >&g

Re: [PATCH/RFC 00/10] ref-filter: use parsing functions

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 11:10 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Fri, Dec 11, 2015 at 5:49 PM, Junio C Hamano <gits...@pobox.com> wrote: >> Karthik Nayak <karthik@gmail.com> writes: >>> ref-filter: introduce a parsing function for each

Re: [PATCH/RFC 08/10] ref-filter: introduce remote_ref_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 11:32 AM, Karthik Nayak <karthik@gmail.com> wrote: > On Sun, Dec 13, 2015 at 6:23 AM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >>> I

Re: [PATCH/RFC 05/10] ref-filter: introduce color_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 11:35 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Thu, Dec 3, 2015 at 8:35 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Wed, Dec 2, 2015 at 4:57 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> On W

Re: [PATCH/RFC 09/10] ref-filter: introduce contents_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 10:11 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Sat, Dec 12, 2015 at 10:10 PM, Eric Sunshine <sunsh...@sunshineco.com> > wrote: >> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >>> +voi

Re: [PATCH/RFC 09/10] ref-filter: introduce contents_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 8:40 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce contents_atom_parser() which will parse the '%(contents)' >> atom and store information into the

Re: [PATCH/RFC 10/10] ref-filter: introduce objectname_atom_parser()

2015-12-13 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 10:19 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 25, 2015 at 8:44 AM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce objectname_atom_parser() which will parse the >> '%(objectname)' atom and store info

Re: [PATCH/RFC 08/10] ref-filter: introduce remote_ref_atom_parser()

2015-12-12 Thread Karthik Nayak
On Sun, Dec 13, 2015 at 6:23 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce remote_ref_atom_parser() which will parse the '%(upstream)' >> and '%(push)' atoms and store info

Re: [PATCH/RFC 01/10] ref-filter: introduce a parsing function for each atom in valid_atom

2015-12-12 Thread Karthik Nayak
On Sat, Dec 12, 2015 at 3:48 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >>> This problem will go away if you introduce the 'valid_atom' field in >>> the patch which actually needs it (as suggested above) rath

Re: [PATCH/RFC 06/10] strbuf: introduce strbuf_split_str_without_term()

2015-12-12 Thread Karthik Nayak
On Sat, Dec 12, 2015 at 4:01 AM, Junio C Hamano <gits...@pobox.com> wrote: > Karthik Nayak <karthik@gmail.com> writes: > >>>> diff --git a/ref-filter.c b/ref-filter.c >>>> @@ -892,14 +892,11 @@ static void populate_value(struct ref_array_item >&

Re: [PATCH/RFC 07/10] ref-filter: introduce align_atom_parser()

2015-12-07 Thread Karthik Nayak
On Thu, Dec 3, 2015 at 2:53 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce align_atom_parser() which will parse 'align' atoms and store >> the required width and position int

Re: [PATCH/RFC 05/10] ref-filter: introduce color_atom_parser()

2015-12-03 Thread Karthik Nayak
On Wed, Dec 2, 2015 at 4:57 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce color_atom_parser() which will parse a "color" atom and >> store its color in the &

Re: [PATCH/RFC 06/10] strbuf: introduce strbuf_split_str_without_term()

2015-12-03 Thread Karthik Nayak
On Wed, Dec 2, 2015 at 1:34 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> The current implementation of 'strbuf_split_buf()' includes the >> terminator at the end of each str

Re: [PATCH/RFC 04/10] ref-filter: skip deref specifier in match_atom_name()

2015-12-02 Thread Karthik Nayak
On Wed, Dec 2, 2015 at 4:41 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Signed-off-by: Karthik Nayak <karthik@gmail.com> > > A bit of explanation about why this change is

Re: [PATCH] ref-filter: mark some file-local functions static

2015-12-02 Thread Karthik Nayak
could you please squash the relevant parts of this patch into > yours. > > Thanks! Thanks, will squash this into the next version. Regards, Karthik Nayak -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH/RFC 01/10] ref-filter: introduce a parsing function for each atom in valid_atom

2015-11-26 Thread Karthik Nayak
On Thu, Nov 26, 2015 at 1:11 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 25, 2015 at 7:10 AM, Karthik Nayak <karthik@gmail.com> wrote: >> On Tue, Nov 24, 2015 at 5:14 AM, Eric Sunshine <sunsh...@sunshineco.com> >> wrote: >>> On W

Re: [PATCH/RFC 01/10] ref-filter: introduce a parsing function for each atom in valid_atom

2015-11-25 Thread Karthik Nayak
On Tue, Nov 24, 2015 at 5:14 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote: > On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik@gmail.com> wrote: >> Introduce a parsing function for each atom in valid_atom. Using this >> we can define special parsing func

Re: [PATCH/RFC 00/10] ref-filter: use parsing functions

2015-11-25 Thread Karthik Nayak
On Wed, Nov 25, 2015 at 3:18 AM, Jeff King <p...@peff.net> wrote: > On Thu, Nov 12, 2015 at 01:14:26AM +0530, Karthik Nayak wrote: > >> Karthik Nayak (10): >> ref-filter: introduce a parsing function for each atom in valid_atom >> ref-filter: introduce struct u

<    1   2   3   4   5   6   7   8   9   10   >