On Mon, Sep 21, 2015 at 3:50 PM, Karthik Nayak <karthik@gmail.com> wrote:
> On Mon, Sep 21, 2015 at 12:46 AM, Matthieu Moy
> <matthieu@grenoble-inp.fr> wrote:
>> Karthik Nayak <karthik@gmail.com> writes:
>>
>>> Remove the error repor
of the code introduced
here will be removed when 'branch.c' is ported over to use
'ref-filter' APIs.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
buil
@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 9 +-
builtin/branch.c | 212 +++
ref-filter.c | 2 +-
ref-filter.h | 1 -
t/t1430-bad-ref-
the detached head at the end of the array and printing
it initially.
* Fix broken tests.
Karthik Nayak (8):
branch: refactor width computation
branch: bump get_head_description() to the top
branch: roll show_detached HEAD into regular ref_list
branch: move 'current' check down to the presentation
gt;
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 62
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.
From: Karthik Nayak <karthik@gmail.com>
Remove unnecessary variables from ref_list and ref_item which were
used for width computation. This is to make ref_item similar to
ref-filter's ref_array_item. This will ensure a smooth port of
branch.c to use ref-filter APIs in further p
stian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index
le-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 6 +-
builtin/branch.c | 7 ++-
t/t3203-branch-output.sh | 9 +
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-branch.txt b
show_detached() used to check if the HEAD branch satisfies the
'--contains' option, now that is taken care by append_ref().
Based-on-patch-by: Jeff King <p...@peff.net>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Sign
instead.
Based-on-patch-by: Jeff King <p...@peff.net>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 20 +--
in
> which case it defaults to `HEAD`.
>
This seems good to be included.
> I also had a look at git-branch(1), which has similar `--merged` and
> `--no-merged` options and says:
>
> Only list branches whose tips are reachable from the specified
>
On Fri, Sep 18, 2015 at 8:49 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> Not sure this is much of a problem with regards to "--[no-]merged"
>> I mean isn't the square brackets self-explanatory?
On Fri, Sep 18, 2015 at 9:00 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Fri, Sep 18, 2015 at 8:49 PM, Matthieu Moy
>> <matthieu@grenoble-inp.fr> wrote:
>>> Karthik Nayak <
On Wed, Sep 16, 2015 at 11:53 AM, Karthik Nayak <karthik@gmail.com> wrote:
> On Tue, Sep 15, 2015 at 1:05 AM, Junio C Hamano <gits...@pobox.com> wrote:
>> Karthik Nayak <karthik@gmail.com> writes:
>>
>>> + /*
>>> + * Firs
EAD detached at ...)
> master
>
> which seems weird to me. But we can decide "if sorting on refname, then
> HEAD always comes first anyway".
Thanks for explaining what I had in mind, Seems like the confusion is sorted,
I have nothing more to add to this discussion. Junio is r
On Tue, Sep 15, 2015 at 1:19 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> Remove the error reporting variable to make the code easier to port
>> over to using ref-filter APIs. This variable is not required as in
On Tue, Sep 15, 2015 at 1:05 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> + /*
>> + * First we obtain all regular branch refs and if the HEAD is
>> + * detached then we insert that ref to th
On Mon, Sep 14, 2015 at 12:01 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Sun, Sep 13, 2015 at 12:46 PM, Eric Sunshine <sunsh...@sunshineco.com>
> wrote:
>> On Sun, Sep 13, 2015 at 8:12 AM, Matthieu Moy
>> <matthieu@grenoble-inp.fr> wrote:
>
On Sun, Sep 13, 2015 at 12:53 PM, Karthik Nayak <karthik@gmail.com> wrote:
> Make 'branch.c' use 'ref-filter' APIs for iterating through refs
> sorting. This removes most of the code used in 'branch.c' replacing it
> with calls to the 'ref-filter' library.
>
>
ntored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 9 +-
builtin/branch.c | 213 +++
ref-filter.c | 2 +-
ref-filter.h
stian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index
eu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 6ba7a3f..4d9e4d0 100644
--- a/builtin/branch.c
+++ b/bu
show_detached() used to check if the HEAD branch satisfies the
'--contains' option, now that is taken care by append_ref().
Based-on-patch-by: Jeff King <p...@peff.net>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Sign
gt;
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 62
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.
The changes in this version are:
[7/8]: Change the tests check for stdout and stderr. (check interdiff)
Karthik Nayak (8):
branch: refactor width computation
branch: bump get_head_description() to the top
branch: roll show_detached HEAD into regular ref_list
branch: move 'current' check down
<christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
builtin/branch.c | 328 ++-
ref-filter.c | 2 +-
ref-filter.h | 9 +-
3 files chang
ntored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 9 +-
builtin/branch.c | 213 +++
ref-filter.c | 2 +-
ref-filter.h
From: Karthik Nayak <karthik@gmail.com>
Remove unnecessary variables from ref_list and ref_item which were
used for width computation. This is to make ref_item similar to
ref-filter's ref_array_item. This will ensure a smooth port of
branch.c to use ref-filter APIs in further p
le-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-branch.txt | 6 +-
builtin/branch.c | 7 ++-
t/t3203-branch-output.sh | 9 +
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-branch.txt b
On Sun, Sep 13, 2015 at 5:45 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> 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 b
On Sun, Sep 13, 2015 at 5:42 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> @@ -679,15 +682,20 @@ static int print_ref_list(int kinds, int detached, int
>> verbose, int abbrev, stru
>> if
On Sun, Sep 13, 2015 at 5:21 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> @@ -667,26 +675,22 @@ static int print_ref_list(int kinds, int detached, int
>> verbose, int abbrev, stru
>>
On Sun, Sep 13, 2015 at 5:56 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> /* Print detached HEAD before sorting and printing the rest */
>> - if (detached) {
>> - print_ref_
instead.
Based-on-patch-by: Jeff King <p...@peff.net>
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Change the commit message to explain
On Sat, Sep 12, 2015 at 2:44 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Thu, Sep 10, 2015 at 10:27 PM, Matthieu Moy
>> <matthieu@grenoble-inp.fr> wrote:
>>> Karthik Nayak <kart
om_name(const char *name, const
char *atom_name, const char *
if (!skip_prefix(name, atom_name, ))
return 0; /* doesn't even begin with "atom_name" */
-if (!body[0] || !body[1]) {
+if (!body[0]) {
*val = NULL; /* %(atom_name) and no customization */
return 1;
}
@@ -899,6 +895,7 @@ static void populate_value(struct ref_array_item *ref)
align->position = ALIGN_LEFT;
while (*s) {
+/* Strip trailing comma */
if (s[1])
strbuf_setlen(s[0], s[0]->len - 1);
if (!strtoul_ui(s[0]->buf, 10, (unsigned int *)))
--
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
by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 11 ++
by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 11 ++
cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Thanks-to: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 23 +--
t/t6302-for-each-ref-filter.sh | 4 +
.
While we're at it, remove unused "contents:" atoms from
the `valid_atom` array.
Add documentation and test for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak
From: Karthik Nayak <karthik@gmail.com>
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_refs()' function pr
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-tag.txt | 8 +++-
builtin/tag.c | 24 ++--
t/t7004-tag.sh| 12
3 files changed, 33 insertions(+), 11 deleti
On Thu, Sep 10, 2015 at 10:27 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> This is part of the series of unifying the code used by
>> "git tag -l, git branch -l, git for-each-ref".
>>
>
changeable.
* Small grammatical changes.
* Small changes in the tests to reflect changes in the align
atom code.
Karthik Nayak (14):
ref-filter: move `struct atom_value` to ref-filter.c
ref-filter: introduce ref_formatting_state and ref_formatting_stack
utf8: add function to align a string
.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 5 +
ref-filter.h | 5 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 46963a5..e53c77e 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -55,6 +55,11 @@ static s
.
Add documentation and test for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 3
<christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 54 ++
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/ref-filte
by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Helped-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 11 ++
From: Karthik Nayak <karthik@gmail.com>
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 vers
() -> append_atom()
emit()-> append_literal()
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 78 +++
From: Karthik Nayak <karthik@gmail.com>
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
From: Karthik Nayak <karthik@gmail.com>
Add a function called 'for_each_fullref_in()' to refs.{c,h} which
iterates through each ref for the given path without trimming the path
and also accounting for broken refs, if mentioned.
Add 'filter_ref_kind()' in ref-filter.c to check the kind
cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Thanks-to: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 23 +--
t/t6302-for-each-ref-filter.sh | 4 +
From: Karthik Nayak <karthik@gmail.com>
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_refs()' function pr
it assumes HEAD as the object.
Add documentation and tests for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-tag.txt | 7
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-tag.txt | 8 +++-
builtin/tag.c | 24 ++--
t/t7004-tag.sh| 12
3 files changed, 33 insertions(+), 11 deleti
On Thu, Sep 10, 2015 at 10:26 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> Introduce match_atom_name() which helps in checking if a particular
>> atom is the atom we're looking for and if it has a value attac
From: Karthik Nayak <karthik@gmail.com>
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' to use 'ref-filter'
comp
On Thu, Sep 10, 2015 at 11:29 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> -static int list_tags(struct ref_filter *filter, struct ref_sorting *sorting)
>> +static int list_tags(struct ref_filter *filter, struct r
On Thu, Sep 10, 2015 at 10:58 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> The check was for checking if there is anything after the colon,
>
> Why do you even care? If %(color) expects more specific
> custo
On Thu, Sep 10, 2015 at 11:15 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> It is one thing that the user can actually do the check themselves,
>> but doesn't it make more sense that when we're using co
On Thu, Sep 10, 2015 at 10:44 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> diff --git a/ref-filter.c b/ref-filter.c
>> index 7d2732a..b098b16 100644
>> --- a/ref-filter.c
>> +++ b/ref-f
gt;> to_free = format;
>>
>> (still 83 columns + indentation, but that's a bit shorter than your
>> version).
>
> Sure. This may also be possible
>
> xstrfmt("%s %%(contents:lines=%d)",
> "%(align:15,left)%(refname:short)
On Mon, Sep 7, 2015 at 12:03 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> diff --git a/Documentation/git-for-each-ref.txt
>> b/Documentation/git-for-each-ref.txt
>> index d039f40..c5154bb 100644
>>
On Mon, Sep 7, 2015 at 1:22 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Sat, Sep 5, 2015 at 2:52 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> Introduce match_atom_name() which helps in checking if a particular
>> atom is the atom we're looking for and
On Mon, Sep 7, 2015 at 7:35 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Mon, Sep 7, 2015 at 12:03 PM, Junio C Hamano <gits...@pobox.com> wrote:
>>>> diff --git a/builtin/tag.c b/builti
On Mon, Sep 7, 2015 at 1:40 AM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Sat, Sep 5, 2015 at 2:52 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> Implement an `align` atom which left-, middle-, or right-aligns the
>> content between %(align:...) and %
On Mon, Sep 7, 2015 at 12:19 AM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> @@ -705,9 +719,12 @@ static void grab_sub_body_contents(struct atom_value
>> *val, int deref, struct obj
>>
rebasing this on top of Karthik's part tag
> to use ref-filter series, since I think there will be plenty of merge
> conflicts there...
>
Its already resolved in my series. We use ref-filter's sorting APIs
there :)
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line
From: Karthik Nayak <karthik@gmail.com>
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_refs()' function pr
<christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 54 ++
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/ref-filte
() -> append_atom()
emit()-> append_literal()
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 78 +++
From: Karthik Nayak <karthik@gmail.com>
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' to use 'ref-filter'
comp
From: Karthik Nayak <karthik@gmail.com>
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 vers
From: Karthik Nayak <karthik@gmail.com>
Add a function called 'for_each_fullref_in()' to refs.{c,h} which
iterates through each ref for the given path without trimming the path
and also accounting for broken refs, if mentioned.
Add 'filter_ref_kind()' in ref-filter.c to check the kind
eu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-tag.txt | 8 +++-
builtin/tag.c | 22 +-
t/t7004-tag.sh| 12
3 files changed, 32 insertions(+), 10 deleti
.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 5 +
ref-filter.h | 5 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 46963a5..e53c77e 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -55,6 +55,11 @@ static s
() for checking atom names.
Karthik Nayak (14):
ref-filter: move `struct atom_value` to ref-filter.c
ref-filter: introduce ref_formatting_state and ref_formatting_stack
utf8: add function to align a string into given strbuf
ref-filter: introduce handler function for each atom
ref-filter
com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 10
ref-filter.c | 112 -
t/t6302-for-each-ref-filter.sh | 82 ++
.
Add documentation and test for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-for-each-ref.txt | 3
cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Thanks-to: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
ref-filter.c | 23 +--
t/t6302-for-each-ref-filter.sh | 4 +
From: Karthik Nayak <karthik@gmail.com>
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
it assumes HEAD as the object.
Add documentation and tests for the same.
Mentored-by: Christian Couder <christian.cou...@gmail.com>
Mentored-by: Matthieu Moy <matthieu@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik@gmail.com>
---
Documentation/git-tag.txt | 7
in the sense that it is
> guaranteed not to go on forever, but you need to verify the location
> of the string it found is within the bounds.
That was the idea behind this, but will stick to Matthieu's suggestion.
--
Regards,
Karthik Nayak
--
To unsubscribe from this list: sen
On Thu, Sep 3, 2015 at 9:53 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Eric Sunshine <sunsh...@sunshineco.com> writes:
>
>> On Tue, Sep 1, 2015 at 2:26 PM, Karthik Nayak <karthik@gmail.com> wrote:
>>> Implement an `align` atom which left-, middle-,
On Thu, Sep 3, 2015 at 7:04 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> struct strbuf s = STRBUF_INIT;
>> if (strtoul_ui(valp, 10, >u.contents.lines))
>> die(_("positive widt
On Thu, Sep 3, 2015 at 8:17 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Thu, Sep 3, 2015 at 7:04 PM, Karthik Nayak <karthik@gmail.com> wrote:
>>>>
ich
> I like even more after this discussion ;-).
Yes, your suggestion seems like a good way to go.
--
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, Sep 3, 2015 at 8:09 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Tue, Sep 1, 2015 at 2:26 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> In 'tag.c' we can print N lines from the annotation of the tag using
>> the '-n' option. Copy code
On Thu, Sep 3, 2015 at 7:42 PM, Eric Sunshine <sunsh...@sunshineco.com> wrote:
> On Tue, Sep 1, 2015 at 2:26 PM, Karthik Nayak <karthik@gmail.com> wrote:
>> Implement an `align` atom which left-, middle-, or right-aligns the
>> content between %(align:..) and %(
On Wed, Sep 2, 2015 at 10:58 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Matthieu Moy <matthieu@grenoble-inp.fr> writes:
>
>> Junio C Hamano <gits...@pobox.com> writes:
>>
>>> Karthik Nayak <karthik@gmail.com> writes:
>>&g
gt;
> FWIW, I too find the "15-col followed by a space" easier to
> understand. I was merely being curious when/why Karthik changed
> preference, not objecting to the actual choice.
>
I'm surprised you recall that from memory :D
--
Regards,
Karthik Nayak
--
To unsubs
On Wed, Sep 2, 2015 at 9:41 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Wed, Sep 2, 2015 at 2:37 PM, Matthieu Moy
>> <matthieu@grenoble-inp.fr> wrote:
>>> Karthik Nayak <karth
On Wed, Sep 2, 2015 at 9:15 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> On Wed, Sep 2, 2015 at 8:31 PM, Junio C Hamano <gits...@pobox.com> wrote:
>>> Karthik Nayak <karthik@gmail.com> writes:
On Wed, Sep 2, 2015 at 8:40 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> + if (filter->lines)
>> + format = to_free =
>> xstrfmt("%%(align:15,left)%
On Wed, Sep 2, 2015 at 2:49 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> We have an `at_end` function for each element of the stack which is to
>> be called when the `end` atom is encountered. Using this we
On Wed, Sep 2, 2015 at 2:11 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> +test_expect_success 'alignment with format quote' '
>> + cat >expect <<-EOF &&
>> + refname is ${
On Wed, Sep 2, 2015 at 2:15 PM, Matthieu Moy
<matthieu@grenoble-inp.fr> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>> --- a/ref-filter.c
>> +++ b/ref-filter.c
>
>> @@ -163,9 +174,28 @@ static void quote_formatting(struct strbuf *
On Wed, Sep 2, 2015 at 9:45 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>>>> + if (filter->kind == FILTER_REFS_BRANCHES)
>>>> + ret = for_each_fullref_in("refs
On Wed, Sep 2, 2015 at 8:31 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Karthik Nayak <karthik@gmail.com> writes:
>
>>>> + die(_("format: `end` atom used without a supporting atom"));
>>>
>>> Not a show-stopper, but we m
501 - 600 of 1407 matches
Mail list logo