On Wed, Jul 29, 2015 at 6:16 AM, Jacob Keller wrote:
> On Tue, Jul 28, 2015 at 1:12 PM, Karthik Nayak wrote:
>> On Tue, Jul 28, 2015 at 6:39 PM, Matthieu Moy
>> wrote:
>>> Karthik Nayak writes:
>>>
>>>> We check if given ref is the current branch
On Wed, Jul 29, 2015 at 3:26 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Tue, Jul 28, 2015 at 6:31 PM, Matthieu Moy
>> wrote:
>>>
>>>> -static void show_detached(struct ref_list *ref_list, int maxwidth)
>&g
On Tue, Jul 28, 2015 at 11:27 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> The 'ifexists' atom allows us to print a required format if the
>> preceeding atom has a value. If the preceeding atom has no value then
>> the format given is not printed. e.
On Wed, Jul 29, 2015 at 3:19 AM, Eric Sunshine wrote:
> On Mon, Jul 27, 2015 at 3:27 AM, Karthik Nayak wrote:
>> From: Karthik Nayak
>>
>> Since 'ref-filter' only has an option to match path names add an
>> option for plain fnmatch pattern-matching.
>>
On Wed, Jul 29, 2015 at 3:11 AM, Eric Sunshine wrote:
> On Mon, Jul 27, 2015 at 3:27 AM, Karthik Nayak wrote:
>> Add a new atom "padright" and support %(padright:X) where X is a
>> number. This will align the succeeding atom value to the left
>> followed by
tch_name_as_path(filter->name_patterns, refname))
> --
> 2.5.0.rc0.7.ge1edd74.dirty
>
> --
> 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/majo
On Wed, Jul 29, 2015 at 9:34 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Ah, I hate making grammatical errors, Even though I check it always gets
>> away.
>> Anyways waiting for Junio and others to reply on this version. Could do a
>> resend
>> f
On Tue, Jul 28, 2015 at 9:49 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> From: Karthik Nayak
>>
>> Add support for %(objectname:size=X) where X is a number.
>> This will print the first X characters of an objectname.
>> The minimum value for X is
On Tue, Jul 28, 2015 at 12:56 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> -static void print_value(struct atom_value *v, int quote_style)
>> +static void apply_formatting_state(struct ref_formatting_state *state,
>> +struct atom
On Tue, Jul 28, 2015 at 11:23 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Tue, Jul 28, 2015 at 7:05 PM, Matthieu Moy
>> wrote:
>>
>>> Ideally, you could also have a modifier atom %(alignleft) [...]
>>
>> This could work for refname, as
On Tue, Jul 28, 2015 at 1:16 PM, Jacob Keller wrote:
> On Tue, Jul 28, 2015 at 12:11 AM, Karthik Nayak wrote:
>> Add the '--points-at' option provided by 'ref-filter'. The option lets
>> the user to list only branches which points at the given object.
>&g
t
> (any plan on how to fix it?).
>
On the other hand I wonder if the test is even needed as, we don't
really need it
Cause we remove that ability of branch.c by using filter_refs().
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsub
Re-sending this as it wasn't sent as plain text and failed.
On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> @@ -458,7 +345,7 @@ static void add_verbose_info(struct strbuf *out, struct
>> ref_array_item *item,
>>
On Tue, Jul 28, 2015 at 1:39 PM, Christian Couder
wrote:
> On Tue, Jul 28, 2015 at 9:11 AM, Karthik Nayak wrote:
>
>> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
>> index a67138a..897cd81 100644
>> --- a/Documentation/git-branch.txt
&g
On Tue, Jul 28, 2015 at 1:27 PM, Jacob Keller wrote:
> On Tue, Jul 28, 2015 at 12:11 AM, Karthik Nayak wrote:
>> Make 'branch.c' use 'ref-filter' APIs for iterating through refs
>> sorting. This removes most of the code used in 'branch.c' replacing
On Tue, Jul 28, 2015 at 7:18 PM, Matthieu Moy
wrote:
> Christian Couder writes:
>
>> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote:
>>
>>> +static void ref_array_append(struct ref_array *array, const char *refname)
>>> +{
>>> + siz
On Tue, Jul 28, 2015 at 1:47 PM, Christian Couder
wrote:
> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote:
>
>> +static void ref_array_append(struct ref_array *array, const char *refname)
>> +{
>> + size_t len = strlen(refname);
>> + struct r
On Tue, Jul 28, 2015 at 1:52 PM, Christian Couder
wrote:
> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote:
>> diff --git a/ref-filter.h b/ref-filter.h
>> index 7d1871d..3458595 100644
>> --- a/ref-filter.h
>> +++ b/ref-filter.h
>> @@ -5,6 +5,7 @@
&
On Tue, Jul 28, 2015 at 6:39 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> We check if given ref is the current branch in print_ref_list(). Move
>> this check to print_ref_item() where it is checked right before
>> printing.
>
> This means that the '*
On Tue, Jul 28, 2015 at 6:31 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Remove show_detached() and make detached HEAD to be rolled into
>> regular ref_list by adding REF_DETACHED_HEAD as a kind of branch and
>> supporting the same in append_ref().
>
&
On Tue, Jul 28, 2015 at 3:17 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> From: Karthik Nayak
>
> Why did send-email add this From: header? Strange, it has the same
> content as your actual From: field.
>
Not sure why, everything else came out fine. Idk what h
On Tue, Jul 28, 2015 at 2:20 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/t/t6302-for-each-ref-filter.sh
>> +++ b/t/t6302-for-each-ref-filter.sh
>> @@ -149,4 +149,25 @@ test_expect_success 'check `colornext` format option'
On Tue, Jul 28, 2015 at 1:24 PM, Jacob Keller wrote:
> On Mon, Jul 27, 2015 at 11:56 PM, Karthik Nayak wrote:
>> The 'ifexists' atom allows us to print a required format if the
>> preceeding atom has a value. If the preceeding atom has no value then
>
> Don
On Tue, Jul 28, 2015 at 7:08 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +static int filter_branch_kind(struct ref_filter *filter, const char
>> *refname)
>> +{
>> + int kind, i;
>> +
>> + static struct {
>> +
On Tue, Jul 28, 2015 at 2:43 PM, Christian Couder
wrote:
> On Tue, Jul 28, 2015 at 8:56 AM, Karthik Nayak wrote:
>> @@ -712,6 +713,15 @@ static void populate_value(struct ref_array_item *ref)
>> v->modifier_atom = 1;
>>
On Tue, Jul 28, 2015 at 2:15 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/t/t6302-for-each-ref-filter.sh
>> +++ b/t/t6302-for-each-ref-filter.sh
>> @@ -133,4 +133,20 @@ test_expect_success 'reverse version sort' '
>>
On Tue, Jul 28, 2015 at 9:13 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> From: Karthik Nayak
>>
>> Add support for %(objectname:size=X) where X is a number.
>> This will print the first X characters of an objectname.
>> The minimum value for X is
On Tue, Jul 28, 2015 at 2:12 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> + if (skip_prefix(name, "objectname:size=", &p)) {
>> + unsigned int size = atoi(p);
>
> You have the same problem as for tag.c: don't use atoi, and make
On Tue, Jul 28, 2015 at 7:05 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> This version also doesn't use the printing options provided by
>> branch.c.
>
> Do you mean "provided by ref-filter.{c,h}"?
>
Yes! my bad.
>> I wanted to discuss h
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
--
#x27;ref-filter'
to filter out tags based on the options set.
We provide a sorting option provided for 'branch.c' by using the sorting
options provided by 'ref-filter'.
Modify documentation and add tests for the same.
Mentored-by: Christian Couder
Mentored-by: Matth
Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 5 +
ref-filter.c | 20 +++-
ref-filter.h | 4 +++-
t/t6302-for-each-ref-filter.sh | 16
4 fil
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 122 ---
1 file changed, 63 insertions(+), 59 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index b058b74..f3d83d0 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
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 | 289
From: Karthik Nayak
Remove unnecessary variables from ref_list and ref_item
which were used for width computation. Make other changes
accordingly. This patch is a precursor for porting branch.c
to use ref-filter APIs.
Based-on-patch-by: Jeff King
Mentored-by: Christian Couder
Mentored-by
est for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 8
ref-filter.c | 37 ++---
ref-filter.h | 5 +++--
t/t6302-f
From: Karthik Nayak
Add an option in 'filter_refs()' to use 'for_each_branch_ref()'
and filter refs. This type checking is done by adding a
'FILTER_REFS_BRANCHES' in 'ref-filter.h'.
Add an option in 'ref_filter_handler()' to filter differen
We check if given ref is the current branch in print_ref_list(). Move
this check to print_ref_item() where it is checked right before
printing.
Based-on-patch-by: Jeff King
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 29
Based-on-patch-by: Jeff King
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
builtin/branch.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index ba9cbad..8d0521e 100644
From: Karthik Nayak
Add support for %(objectname:size=X) where X is a number.
This will print the first X characters of an objectname.
The minimum value for X is 5. Hence any value lesser than
5 will default to 5 characters.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off
g.
Any tips or suggestions are welcome, thanks all :)
--
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
From: Karthik Nayak
Add a functions called 'for_each_tag_ref_fullpath()' to refs.{c,h}
which iterates through each tag ref without trimming the path.
Add an option in 'filter_refs()' to use 'for_each_tag_ref_fullpath()'
and filter refs. This type checking is done
From: Karthik Nayak
Add support to sort by version using the "v:refname" and
"version:refname" option. This is achieved by using the 'versioncmp()'
function as the comparing function for qsort.
This option is included to support sorting by versions in `git ta
From: Karthik Nayak
Using 'ref-filter' APIs implement the '--merged' and '--no-merged'
options into 'tag.c'. The '--merged' option lets the user to only
list tags merged into the named commit. The '--no-merged' option
lets the user to o
r the same.
Helped-by: Duy Nguyen
Helped-by: Junio C Hamano
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 6 ++
ref-filter.c | 27 +--
ref-filter.h
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' APIs for iterating through refs sorting
and printing of refs. This removes most of the code used in 'tag.c'
replacing it with calls to the 'ref-filter' library.
Make 'tag.c' use the 'filter_
From: Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using
the '-n' option. Copy code from 'tag.c' to 'ref-filter' and
modify 'ref-filter' to support printing of N lines from the annotation
of tags.
Mentored-by: C
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process
of porting 'tag.c' to use 'ref-filter' APIs.
This is a temporary step before porting 'tag.c&
From: Karthik Nayak
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
Mentore
From: Karthik Nayak
Since 'ref-filter' only has an option to match path names add an
option for plain fnmatch pattern-matching.
This is to support the pattern matching options which are used in `git
tag -l` and `git branch -l` where we can match patterns like `git tag
-l foo*` which w
: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c | 71 +++-
ref-filter.h | 5 +
2 files changed, 61 insertions(+), 15 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 7561727..a919a14 100644
--- a/ref-filter.c
refs/tags/one|refs/tags/one|refs/tags/one|
+ refs/tags/signed-tag|refs/tags/signed-tag |refs/tags/signed-tag|
+refs/tags/three|refs/tags/three |refs/tags/three|
+refs/tags/two|refs/tags/two|refs/tags/two|
EOF
-git for-each-ref --format="%(padright:25)%(refname)|" >actual &&
+git for-each-ref
--format="%(refname)%(padright:25)|%(refname)|%(refname)|" >actual &&
test_cmp expect actual
'
--
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 Tue, Jul 28, 2015 at 12:17 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy
>> wrote:
>>> Yes, but on the other hand we already have:
>>>
>>> git log --format='%<|(50)A very long
On Mon, Jul 27, 2015 at 6:20 PM, Matthieu Moy
wrote:
> u
> also need to check that it is taken into account for the right atom and
> only this one. I'd suggest
>
> --format '%(refname)%(padright:25)|%(refname)|%(refname)|'
I guess this is more accurate, Thanks.
--
n is the right one.
Sorry but I didn't understand what you're trying to say here, Matthieu.
>
>> My preference between the three is "%(padright:4)", etc. to apply to
>> the "next span", but I can live with "it is an error to pad-right
>> a far-a
On Mon, Jul 27, 2015 at 7:58 PM, Junio C Hamano wrote:
> Matthieu Moy writes:
>
>> Karthik Nayak writes:
>>
>>> Make the `color` atom a pseudo atom and ensure that it uses
>>> `ref_formatting_state`.
>>
>> Actually, I think this is an incorrect c
On Mon, Jul 27, 2015 at 6:36 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -1195,6 +1197,11 @@ void ref_array_sort(struct ref_sorting *sorting,
>> struct ref_array *array)
>> static void ref_formattin
On Mon, Jul 27, 2015 at 8:54 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> On Sun, Jul 26, 2015 at 4:10 AM, Junio C Hamano wrote:
>>
>>> Without looking at the callers, s->version looks like a misdesign
>>> that should be updated to use the same c
On Mon, Jul 27, 2015 at 9:36 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Mon, Jul 27, 2015 at 9:27 PM, Karthik Nayak wrote:
>>> On Mon, Jul 27, 2015 at 6:24 PM, Matthieu Moy
>>> wrote:
>>>> Karthik Nayak writes:
>>>
On Mon, Jul 27, 2015 at 6:17 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> Make the `color` atom a pseudo atom and ensure that it uses
>> `ref_formatting_state`.
>
> Actually, I think this is an incorrect change.
>
> Previously, %(color:...) was taking effe
On Mon, Jul 27, 2015 at 9:27 PM, Karthik Nayak wrote:
> On Mon, Jul 27, 2015 at 6:24 PM, Matthieu Moy
> wrote:
>> Karthik Nayak writes:
>>
>>> --- a/ref-filter.c
>>> +++ b/ref-filter.c
>>> @@ -946,6 +946,32 @@ static int commit_contains(struct r
On Mon, Jul 27, 2015 at 6:24 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>> @@ -946,6 +946,32 @@ static int commit_contains(struct ref_filter *filter,
>> struct commit *commit)
>
>> +/*
>> + * Return
On Mon, Jul 27, 2015 at 6:12 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +static void ref_formatting(struct ref_formatting_state *state,
>> +struct atom_value *v, struct strbuf *value)
>> {
>> - struct strbuf sb = STRBUF_INIT
From: Karthik Nayak
Add support to sort by version using the "v:refname" and
"version:refname" option. This is achieved by using the 'versioncmp()'
function as the comparing function for qsort.
This option is included to support sorting by versions in `git ta
From: Karthik Nayak
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
Mentore
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process
of porting 'tag.c' to use 'ref-filter' APIs.
This is a temporary step before porting 'tag.c&
From: Karthik Nayak
Using 'ref-filter' APIs implement the '--merged' and '--no-merged'
options into 'tag.c'. The '--merged' option lets the user to only
list tags merged into the named commit. The '--no-merged' option
lets the user to o
Make the `color` atom a pseudo atom and ensure that it uses
`ref_formatting_state`.
---
ref-filter.c | 19 ++-
ref-filter.h | 4 +++-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index a3625e8..cc25c85 100644
--- a/ref-filter.c
+++ b/
From: Karthik Nayak
Add a functions called 'for_each_tag_ref_fullpath()' to refs.{c,h}
which iterates through each tag ref without trimming the path.
Add an option in 'filter_refs()' to use 'for_each_tag_ref_fullpath()'
and filter refs. This type checking is done
From: Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using
the '-n' option. Copy code from 'tag.c' to 'ref-filter' and
modify 'ref-filter' to support printing of N lines from the annotation
of tags.
Mentored-by: C
From: Karthik Nayak
Since 'ref-filter' only has an option to match path names add an
option for plain fnmatch pattern-matching.
This is to support the pattern matching options which are used in `git
tag -l` and `git branch -l` where we can match patterns like `git tag
-l foo*` which w
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' APIs for iterating through refs sorting
and printing of refs. This removes most of the code used in 'tag.c'
replacing it with calls to the 'ref-filter' library.
Make 'tag.c' use the 'filter_
r the same.
Helped-by: Duy Nguyen
Helped-by: Junio C Hamano
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Documentation/git-for-each-ref.txt | 6 ++
ref-filter.c | 24
ref-filter.h |
: Matthieu Moy
Signed-off-by: Karthik Nayak
---
ref-filter.c | 46 +++---
ref-filter.h | 5 +
2 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 7561727..a3625e8 100644
--- a/ref-filter.c
+++ b/ref-filter.
ag -l --sort=version:refname | grep "foo" >actual &&
+git for-each-ref --sort=version:refname
--format="%(refname:short)" refs/tags/ | grep "foo" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6
@@ -98,7 +114,7 @
On Sun, Jul 26, 2015 at 10:45 AM, Eric Sunshine wrote:
> On Fri, Jul 24, 2015 at 3:04 PM, Karthik Nayak wrote:
>> Since 'ref-filter' only has an option to match path names add an
>> option for plain fnmatch pattern-matching.
>>
>> This is to support the patte
On Sun, Jul 26, 2015 at 11:28 AM, Eric Sunshine wrote:
> On Sun, Jul 26, 2015 at 12:36 AM, Karthik Nayak wrote:
>> On Sun, Jul 26, 2015 at 9:38 AM, Eric Sunshine
>> wrote:
>>> Also, it is helpful to reviewers if you include an interdiff at the
>>> bottom
the end, you may find that patch 1 is so trivial that
> it can be merged with patch 2 without making review more difficult,
> however, keeping them distinct during development helps you avoid
> conflating unrelated changes.
>
Yes! I'm doing that like Junio suggested. Thanks for bringing i
On Sun, Jul 26, 2015 at 10:16 AM, Eric Sunshine wrote:
> On Fri, Jul 24, 2015 at 3:04 PM, Karthik Nayak wrote:
>> From: Karthik Nayak
>>
>> In 'tag.c' we can print N lines from the annotation of the tag using
>> the '-n' option. Copy code from
On Sun, Jul 26, 2015 at 4:10 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> @@ -1180,19 +1181,17 @@ static int cmp_ref_sorting(struct ref_sorting *s,
>> struct ref_array_item *a, stru
>>
>> get_ref_atom_value(&state, a, s->atom, &va);
>&
On Sun, Jul 26, 2015 at 9:38 AM, Eric Sunshine wrote:
> On Fri, Jul 24, 2015 at 3:04 PM, Karthik Nayak wrote:
>> Add a new atom "align" and support %(align:X) where X is a number.
>> This will align the preceeding atom value to the left followed by
>
> Do you mean
On Sat, Jul 25, 2015 at 3:16 AM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> Make color which was considered as an atom, to use
>> ref_formatting_state and act as a pseudo atom. This allows
>> interchangeability between 'align' and 'color'.
>
On Sat, Jul 25, 2015 at 4:30 AM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> Karthik Nayak writes:
>>
>>> -if (!ref->value) {
>>> -populate_value(ref);
>>> +/*
>>> + * If the atom is a pseud
From: Karthik Nayak
Using 'ref-filter' APIs implement the '--merged' and '--no-merged'
options into 'tag.c'. The '--merged' option lets the user to only
list tags merged into the named commit. The '--no-merged' option
lets the user to o
From: Karthik Nayak
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
Mentore
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' APIs for iterating through refs sorting
and printing of refs. This removes most of the code used in 'tag.c'
replacing it with calls to the 'ref-filter' library.
Make 'tag.c' use the 'filter_
From: Karthik Nayak
Since 'ref-filter' only has an option to match path names add an
option for plain fnmatch pattern-matching.
This is to support the pattern matching options which are used in `git
tag -l` and `git branch -l` where we can match patterns like `git tag
-l foo*` which w
From: Karthik Nayak
Add a new atom "align" and support %(align:X) where X is a number.
This will align the preceeding atom value to the left followed by
spaces for a total length of X characters. If X is less than the item
size, the entire atom value is printed.
Helped-by: Duy Nguyen
From: Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using
the '-n' option. Copy code from 'tag.c' to 'ref-filter' and
modify 'ref-filter' to support printing of N lines from the annotation
of tags.
Mentored-by: C
From: Karthik Nayak
Add a functions called 'for_each_tag_ref_fullpath()' to refs.{c,h}
which iterates through each tag ref without trimming the path.
Add an option in 'filter_refs()' to use 'for_each_tag_ref_fullpath()'
and filter refs. This type checking is done
From: Karthik Nayak
Add support to sort by version using the "v:refname" and
"version:refname" option. This is achieved by using the 'versioncmp()'
function as the comparing function for qsort.
This option is included to support sorting by versions in `git ta
Make color which was considered as an atom, to use
ref_formatting_state and act as a pseudo atom. This allows
interchangeability between 'align' and 'color'.
Helped-by: Junio C Hamano
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
--
From: Karthik Nayak
Make 'tag.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process
of porting 'tag.c' to use 'ref-filter' APIs.
This is a temporary step before porting 'tag.c&
This is part of my GSoC project to unify git tag -l, git branch -l,
git for-each-ref. This patch series is continued from: Git (next)
https://github.com/git/git/commit/bf5418f49ff0cebc6e5ce04ad1417e1a47c81b61
Version 3 can be found here
http://thread.gmane.org/gmane.comp.version-control.git/27416
On Thu, Jul 23, 2015 at 1:10 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +--merged []::
>> + Only list tags whose tips are reachable from the
>> + specified commit (HEAD if not specified).
>> +
>> +--no-merged []::
>> + Only list
On Thu, Jul 23, 2015 at 12:14 AM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> + strtoul_ui(valp, 10, &ref->align_value);
>> + if (ref->align_value < 1)
>> + die(_("Value shou
On Mon, Jul 20, 2015 at 12:50 AM, Christian Couder
wrote:
> On Sun, Jul 19, 2015 at 12:00 AM, Karthik Nayak wrote:
>> From: Karthik Nayak
>>
>> Using 'ref-filter' APIs implement the '--merged' and '--no-merged'
>> options into 'ta
On Mon, Jul 20, 2015 at 11:42 PM, Eric Sunshine wrote:
> On Mon, Jul 20, 2015 at 4:01 AM, Christian Couder
> wrote:
>> On Mon, Jul 20, 2015 at 8:24 AM, Eric Sunshine
>> wrote:
>>> On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak
>>> wrote:
>>
ngs like that
> if desired.
This implementation looks good. Will include this, thanks a bunch.
>
> We may want to further clean up to update %(color) thing to clarify
> that it is a pseudo atom. I suspect %(align:20)%(color:blue) would
> do a wrong thing with the current code, and it would be a reasonable
> thing to allow both of these interchangeably:
>
> %(align:20)%(color:blue)%(refname:short)%(color:reset)
> %(color:blue)%(align:20)%(refname:short)%(color:reset)
>
> and implementation of that would become more obvious once you have a
> more explicit "formatting state" that is known to and shared among
> get_value(), the for() loop that walks the format string, and
> print_value().
Yup! ill put in a fix for %(color:) with this patch.
Thanks a lot.
--
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 Mon, Jul 20, 2015 at 11:31 PM, Eric Sunshine wrote:
> On Mon, Jul 20, 2015 at 1:22 PM, Karthik Nayak wrote:
>> Add a new atom "align" and support %(align:X) where X is a number.
>> This will align the preceeding atom value to the left followed by
>> spaces for
901 - 1000 of 1441 matches
Mail list logo