On Thu, Dec 3, 2015 at 2:53 AM, Eric Sunshine wrote:
> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak wrote:
>> Introduce align_atom_parser() which will parse 'align' atoms and store
>> the required width and position into the 'used_atom' structure. While
>&
On Wed, Dec 2, 2015 at 1:34 PM, Eric Sunshine wrote:
> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak wrote:
>> The current implementation of 'strbuf_split_buf()' includes the
>> terminator at the end of each strbuf post splitting. Include an option
>
> s/Include
On Wed, Dec 2, 2015 at 4:57 AM, Eric Sunshine wrote:
> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak wrote:
>> Introduce color_atom_parser() which will parse a "color" atom and
>> store its color in the "use_atom" structure for further usage in
>
On Wed, Dec 2, 2015 at 4:41 AM, Eric Sunshine wrote:
> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak wrote:
>> Signed-off-by: Karthik Nayak
>
> A bit of explanation about why this change is desirable would be
> welcome. I'm guessing it's because a future patch
> 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
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Nov 26, 2015 at 1:11 AM, Eric Sunshine wrote:
> On Wed, Nov 25, 2015 at 7:10 AM, Karthik Nayak wrote:
>> On Tue, Nov 24, 2015 at 5:14 AM, Eric Sunshine
>> wrote:
>>> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak
>>> wrote:
>>>>
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.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 42 +++---
On Wed, Nov 25, 2015 at 3:18 AM, Jeff King 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 used_atom
>> ref-
On Tue, Nov 24, 2015 at 5:14 AM, Eric Sunshine wrote:
> On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak wrote:
>> Introduce a parsing function for each atom in valid_atom. Using this
>> we can define special parsing functions for each of the atoms. Since
>> we have a thir
281180 which I
recently sent.
So replace "for-each-branch-remainder" with this in "Whats cooking"?
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Karthik Nayak
---
ref-filter.c | 4
1 file changed, 4 insertions(+)
diff --git a/ref-filter.c b/ref-filter.c
index 1542f5f..4af28ef 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -37,6 +37,10 @@ static int match_atom_name(const char *name, const char
*atom_name, const char
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.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 66 ++--
%(align:position=middle,width=30)).
Add documentation and modify the existing tests in t6302 to reflect
the same.
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 18 ---
ref-filter.c | 102 +++--
t/t6302-for-each-ref
a given string into strbufs without including the terminator.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 5 +
strbuf.c | 17 +
strbuf.h | 14 ++
3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 0523d54..
Bump match_atom() to the top for usage in further patches.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 748a2fe..1542f5f 100644
--- a/ref-filter.c
+++ b/ref
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.
Signed-off-by: Karthik
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()'.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 20
1 file changed, 16 insertions(+), 4
Introduce a parsing function for each atom in valid_atom. Using this
we can define special parsing functions for each of the atoms. Since
we have a third field in valid_atom structure, we now fill out missing
cmp_type values.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 59
Introduce the 'used_array' structure which would replace the existing
implementation of 'used_array' (which a list of atoms). This helps us
parse atom's before hand and store required details into the
'used_array' for future usage.
Signed-off-by: Ka
introduce
parsing functions for atoms so that they maybe parsed before hand and
the necessary values maybe stored the introduce used_atom structure.
Karthik Nayak (10):
ref-filter: introduce a parsing function for each atom in valid_atom
ref-filter: introduce struct used_atom
ref-fitler: bump
we can now depend on
being stable.
Helped-by: Junio C Hamano
Reported-by: Johannes Sixt
Signed-off-by: Karthik Nayak
---
ref-filter.c | 2 +-
t/t3203-branch-output.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 046e73b..
On Thu, Oct 29, 2015 at 3:46 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> On Wed, Oct 28, 2015 at 1:20 AM, Junio C Hamano wrote:
>>>> Hence, fallback to alphabetical comparison based on the refname
>>>> whenever the other criterion is equal. Fix t
, which we can now depend
> on being stable.
>
> I am not sure about "HEAD" and "branch-two" in the above (it may be
> comparison between "HEAD" and "refs/heads/branch-two", for example).
>
It actually is, we consider "refs/heads/
equal values cannot be pre-determined) as
pointed out by Johannes Sixt ($gmane/280117).
Hence, fallback to alphabetical comparison based on the refname
whenever the other criterion is equal. Fix the test in t3203 in this
regard.
Reported-by: Johannes Sixt
Signed-off-by: Karthik Nayak
---
ref
On Mon, Oct 26, 2015 at 6:43 AM, Eric Sunshine wrote:
> On Sun, Oct 25, 2015 at 12:29 PM, Karthik Nayak wrote:
>> In ref-filter.c the comparison of refs while sorting is handled by
>> cmp_ref_sorting() function. When sorting as per numerical values
>> (e.g. --sort=ob
equal values cannot be pre-determined) as
pointed out by Johannes Sixt ($gmane/280117).
Hence, fallback to alphabetical comparison based on the refname
whenever the other criterion is equal. Fix the test in t3203 in this
regard.
Reported-by: Johannes Sixt
Signed-off-by: Karthik Nayak
---
ref
On Sun, Oct 25, 2015 at 5:48 AM, Eric Sunshine wrote:
> On Sat, Oct 24, 2015 at 10:42 AM, Karthik Nayak wrote:
>> In ref-filter.c the comparison of refs while sorting is handled by
>> cmp_ref_sorting() function. When sorting as per numerical values
>> (e.g. --sort=ob
/280117).
Hence, fallback to alphabetical comparison based on the refname whenever
the other criterion is equal. Fix the test in t3203 in this regard.
Signed-off-by: Karthik Nayak
---
ref-filter.c | 2 +-
t/t3203-branch-output.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions
erhaps cmp_ref_sorting() should fall back
> to alphabetic comparison if the other criterion (when used) compares equal?
>
Seems like a simple and good way to go around this. will reply with a patch.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git&qu
arsing part of it before this series :)
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
f code around and this
had me thinking it's
perhaps easier to do the cleaning up first as Junio suggested.
Maybe then it'd be simpler to do implement this rather than move code around now
and then move code around when we implement the parsing methods we
spoke about earlier?
--
Regards,
r->with_commit_tag_algo' bit. As reported by Jerry
Snitselaar, this causes the '--contains' option to work way slower
than expected, fix this by setting 'filter->with_commit_tag_algo' in
tag.c before calling 'filter_refs()'.
Mentored-by: Matthieu Moy
Tested-
On Sun, Oct 18, 2015 at 2:58 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> So I did poke around a little. I think I missed this out on the
>> original commit (b7cc53e92c806b73e14b03f60c17b7c29e52b4a4).
>>
>> diff --git a/builtin/tag.c b/builtin/tag.c
&g
Jerry Snitselaar, this causes the option to work way
slower than expected, fix this by setting 'filter->with_commit_tag_algo'
in tag.c before calling 'filter_refs()'.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
Tested-by: Jerr
On Sat, Oct 17, 2015 at 9:28 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Could you Squash that in, Junio?
>
> The guilty commit is in master, so you'll need a new commit to fix the
> old one. Can you send a patch with a proper c
version
> git version 2.5.0.275.gac4cc86
>
> snits ~/dev/linux> time git tag --contains 825fcfc
> next-20151012
> next-20151013
> v4.3-rc5
>
> real0m12.842s
> user0m11.536s
> sys 0m1.098s
>
>
> b7cc53e92c806b73e14b03f60c17b7c29e52b4a4 is the first bad comm
the above series.
>> After reading Matthieu's and Junio's discussion, I lean towards the latter.
>
> Leaving it as-is does not fit in my arguments to do the refactoring
> later. It's not introducing "another instance of an existing pattern",
> but actually
On Thu, Oct 8, 2015 at 2:48 PM, Karthik Nayak wrote:
> Add support for %(upstream:track,nobracket) which will print the
> tracking information without the brackets (i.e. "ahead N, behind M").
>
> Add test and documentation for the same.
> ---
> Documentati
On Tue, Oct 13, 2015 at 10:01 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Port branch.c to use ref-filter APIs for printing. This clears out
>> most of the code used in branch.c for printing and replaces them with
>> calls made to the ref-filter library.
&g
/war-on-sprintf topic, but the new code since that
> commit cleaned up.
>
Yes, pretty much the same.
> I'd expect that this will be rolled into Karthik's series in the
> next reroll?
>
> Looking good. Thanks.
Yes, I've adding this into my series.
--
Regards,
Kart
On Mon, Oct 12, 2015 at 6:06 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> On Fri, Oct 9, 2015 at 11:59 PM, Junio C Hamano wrote:
>> ...
>> Also does it make sense to integrate these changes here? Or would you like to
>> have another series on this?
>
&
On Sun, Oct 11, 2015 at 11:40 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> A little blurry on how this works, as in how translation takes place,
>> probably need to look at some code.
>
> What you really need to understand is: _("foo") is translated,
On Mon, Oct 12, 2015 at 1:02 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Sun, Oct 11, 2015 at 9:51 PM, Matthieu Moy
>> wrote:
>>> Karthik Nayak writes:
>>>
>>>> Also does it make sense to integrate these changes here? Or would yo
m_theirs);
> else
> v->s = xstrfmt("[ahead %d,
> behind %d]",
> diff --git a/ref-filter.h b/ref-filter.h
> index 0014b92..2cce02c 100644
> --- a/ref-filter.h
> +++ b/ref-filter.h
On Sun, Oct 11, 2015 at 9:51 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Also does it make sense to integrate these changes here? Or would you like to
>> have another series on this?
>
> To me, the important in this series is to avoid introducing duplicated
On Sun, Oct 11, 2015 at 9:42 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Fri, Oct 9, 2015 at 12:10 AM, Matthieu Moy
>> wrote:
>>> Karthik Nayak writes:
>>>
>>>> --- a/ref-filter.c
>>>> +++ b/ref-filter.c
>>>>
On Sun, Oct 11, 2015 at 9:35 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>>>> diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
>>>> index 7c9bec7..6fc569e 100755
>>>> --- a/t/t6300-for-each-ref.sh
>>>>
t;modifier[no].part0 = xstrndup(sp, equal - sp);
atom->modifier[no].part1 = xstrndup(equal + 1, ep - equal - 1);
}
sp = ep;
}
}
}
or something on these lines for what you suggested. We could improve by
having a special parsing function for sel
On Fri, Oct 9, 2015 at 12:10 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -1118,8 +1118,10 @@ static void populate_value(struct ref_array_item *ref)
>> char buf[40];
>>
On Fri, Oct 9, 2015 at 12:31 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Copy the implementation of get_head_description() from branch.c. This
>> gives a description of the HEAD ref if called. This is used as the
>> refname for the HEAD ref whenever the FILTER_R
On Fri, Oct 9, 2015 at 12:28 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -464,14 +464,28 @@ static void *get_obj(const unsigned char *sha1, struct
>> object **obj, unsigned lo
>> static int grab_objectn
On Fri, Oct 9, 2015 at 12:21 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> @@ -309,11 +319,19 @@ static void then_atom_handler(struct atom_value
>> *atomv, struct ref_formatting_st
>> if (if_then_else->then_atom)
>> die(_("for
On Fri, Oct 9, 2015 at 12:49 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/Documentation/git-for-each-ref.txt
>> +++ b/Documentation/git-for-each-ref.txt
>> @@ -134,9 +134,17 @@ align::
>> `` is either left, right or middle, default being
>
On Fri, Oct 9, 2015 at 12:18 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +static void if_then_else_handler(struct ref_formatting_stack **stack)
>> +{
>> + struct ref_formatting_stack *cur = *stack;
>> + struct ref_formatting_stack *prev = cur->p
On Thu, Oct 8, 2015 at 10:40 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
>> wrote:
>>>> + unsigned int nobracket = 0;
>>>> +
>>>> +
of comma-separated values, the only other place we use that is
in the align atom. Also I find this very specific to get a function out of.
Somehow I think this is the simplest way to go about this.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git&qu
On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +An example to show the usage of %(if)...%(then)...%(else)...%(end).
>> +This prefixes the current branch with a star.
>> +
>> +
>> +#!/bin/sh
>> +
>>
Add the options `:dir` and `:base` to the %(refname) atom. The `:dir`
option gives the directory (the part after $GIT_DIR/) of the ref
without the refname. The `:base` option gives the base directory of
the given ref (i.e. the directory following $GIT_DIR/refs/).
Add tests and documentation for th
-each-ref.sh to reflect this change.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c| 4 +++-
t/t6300-for-each-ref.sh | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 38e4424.
Add support for %(upstream:track,nobracket) which will print the
tracking information without the brackets (i.e. "ahead N, behind M").
Add test and documentation for the same.
---
Documentation/git-for-each-ref.txt | 6 --
ref-filter.c | 28 +++-
these changes.
Change calc_maxwidth() to also account for the length of HEAD ref, by
calling ref-filter:get_head_discription().
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 261
Implement the '--format' option provided by 'ref-filter'.
This lets the user list tags as per desired format similar
to the implementation in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
description in branch.c:calc_maxwidth() when we port
branch.c to use ref-filter APIs.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 4
ref-filter.c | 38 --
ref-filter.h | 2 ++
3 files
.
show_ref_array_item() is kept as a convenience wrapper around it which
obtains the strbuf and prints it the standard output.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c | 16
ref-filter.h | 3 +++
2 files changed, 15
Add support for %(objectname:short=) which would print the
abbreviated unique objectname of given length. When no length is
specified 7 is used. The minimum length is 4.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik
then) atom is differnt from the given ''.
Add tests and Documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 4 +++-
ref-filter.c | 28 +
-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 47 +-
ref-filter.c | 127 +++--
t/t6302-for-each-ref-filter.sh | 67 +++
3 files changed, 231 insertions(+), 10 deletions(-)
diff --git a
This is part of unification of the commands 'git tag -l, git branch -l
and git for-each-ref'. This ports over branch.c to use ref-filter's
printing options. The previous version of the patch can be found at:
http://article.gmane.org/gmane.comp.version-control.git/278926
Karthik Na
On Wed, Oct 7, 2015 at 11:28 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Wed, Oct 7, 2015 at 12:33 AM, Matthieu Moy
>> wrote:
>>
>>> To go a bit further, you can pre-build a string or strbuf aligned_short
>>> with value like "%%(ali
On Wed, Oct 7, 2015 at 12:33 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> If you look closely, thats only for the local branches, the remotes
>> have `align` atom when
>> printing in verbose.
>
> Yes, but that's already one thing factored out of th
On Wed, Oct 7, 2015 at 1:08 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Mon, Oct 5, 2015 at 2:19 PM, Matthieu Moy
>> wrote:
>>> Karthik Nayak writes:
>>>> which does not play well with the implementation of --column as done
>>>> in
On Mon, Oct 5, 2015 at 2:19 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>> which does not play well with the implementation of --column as done
>> in tag.c. Where, If I'm not wrong the --column option captures all
>> output, formats it and then prints it to stdout.
On Tue, Oct 6, 2015 at 12:13 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Sat, Oct 3, 2015 at 6:11 PM, Matthieu Moy
>> wrote:
>>> Actually, this is not a performance-cricical piece of code at all, so I
>>> think it's even better to build an s
On Sat, Oct 3, 2015 at 6:11 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> - if (upstream_is_gone) {
>> - if (show_upstream_ref)
>> - strbuf_addf(stat, _("[%s: gone]"), fancy.buf);
>
> The old string was translated
On Sat, Oct 3, 2015 at 5:38 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> diff --git a/ref-filter.c b/ref-filter.c
>> index 099acd6..48b06e3 100644
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -1133,8 +1133,10 @@ static void popul
On Sat, Oct 3, 2015 at 5:32 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Introduce format_ref_array_item() which will output the details of a
>> given ref_array_item as per the given format and quote_style to the
>> given strbuf.
>
> Why do you need it i
ls the
> formatting machinery what kind of derivation is desired?
>
> If so would %(refname:dir) & %(refname:base) be more in line with
> the overall structure?
This seems way better, I like these names more.
On Sun, Oct 4, 2015 at 11:21 PM, Matthieu Moy
wrote:
> Karthik Nay
On Sat, Oct 3, 2015 at 3:32 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> This adds %(path) and %(path:short) atoms. The %(path) atom will print
>> the path of the given ref, while %(path:short) will only print the
>> subdirectory of the given ref.
>
>
On Sat, Oct 3, 2015 at 3:09 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Implement %(if), %(then) and %(else) atoms. Used as
>> %(if)..%(then)..%(end) or %(if)..%(then)..%(else)..%(end).
>
> I prefer ... to .., which often means "interval" as in HEAD^^
On Sat, Oct 3, 2015 at 2:32 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Add support for %(objectname:short,) which would print the
>> abbreviated unique objectname of given length. When no length is
>> specified 7 is used. The minimum length is 4.
>
> It
On Sat, Oct 3, 2015 at 2:24 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Implement %(if:equals=) wherein the if condition is only
>> satisfied if the value obtained between the %(if:...) and %(then) atom
>> is the same as the given ''.
>>
>>
On Sat, Oct 3, 2015 at 2:15 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> +static int is_empty(const char * s){
>> + while (*s != '\0') {
>> + if (!isspace(*s))
>> + return 0;
>> + s++;
>&g
then) atom is differnt from the given ''.
Add tests and Documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 4 +++-
ref-filter.c | 28 +
Implement the '--format' option provided by 'ref-filter'.
This lets the user list tags as per desired format similar
to the implementation in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 23 +++-
ref-filter.c | 116 ++---
t/t6302-for-each-ref-filter.sh | 48 +++
3 files changed, 177 insertions(+), 10 deletions(-)
diff --git a
#x27; now
prints the upstream and its tracking details separately as
"[] []" instead of "[: ]".
Make changes in /t/t6040-tracking-info.sh to reflect the change.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Na
-each-ref.sh to reflect this change.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c| 4 +++-
t/t6300-for-each-ref.sh | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 099acd6.
g. This seems overly complex to the
uninitiated as it uses a complex atom combinations to mimic the
existing branch printing format.
Karthik Nayak (9):
ref-filter: implement %(if), %(then), and %(else) atoms
ref-filter: implement %(if:equals=) and
%(if:notequals=)
ref-filter:
Copy the implementation of get_head_description() from branch.c.
This gives a description of the HEAD ref if called. This is used as
the refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD
option is used.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik
strbuf and prints it the standard output.
This is needed when we port over the printing options of ref-filter to
branch.c.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c | 16
ref-filter.h | 3 +++
2 files changed, 15
This adds %(path) and %(path:short) atoms. The %(path) atom will print
the path of the given ref, while %(path:short) will only print the
subdirectory of the given ref.
Add tests and documentation for the same.
---
Documentation/git-for-each-ref.txt | 5 +
ref-filter.c
Add support for %(objectname:short,) which would print the
abbreviated unique objectname of given length. When no length is
specified 7 is used. The minimum length is 4.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik
On Fri, Sep 25, 2015 at 9:30 PM, Junio C Hamano wrote:
> Matthieu Moy writes:
>
>> Karthik Nayak writes:
>>
>>> Remove the error "branch '%s' does not point at a commit" in
>>> apppend_ref() which reports branch refs which do not point to
ref-filter ignores refs
which do not point at commits silently.
Based-on-patch-by: Jeff King
Helped-by: Junio C Hamano
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 18 --
1 file changed, 4 insertions(+), 14 dele
On Thu, Sep 24, 2015 at 12:44 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Remove the error reporting variable to make the code easier to port
>> over to using ref-filter APIs.
>>
>> This also removes the error from being displayed. As branch.c will
On Thu, Sep 24, 2015 at 12:27 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Remove the error reporting variable to make the code easier to port
>> over to using ref-filter APIs.
>>
>> This also removes the error from being displayed. As branch.c will
actual lossage of the error message shown to the user.
>
That needs to be changed, I'll reply with a changed commit, thanks!
--
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
f-filter'
completely. As this is a temporary step, most of the code introduced
here will be removed when 'branch.c' is ported over to use
'ref-filter' APIs.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 317
ref-filter.
Modify some of the tests in t1430 to check the stderr for a warning
regarding the broken ref. This is done as ref-filter throws a warning
for broken refs rather than directly printing them.
Add tests and documentation for the same.
Mentored-by: Chri
Add the '--points-at' option provided by 'ref-filter'. The option lets
the user to list only branches which points at the given object.
Add documentation and tests for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
--
401 - 500 of 1441 matches
Mail list logo