Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-08-19 Thread Karthik Nayak
On Wed, Aug 19, 2015 at 9:19 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: On Thu, Jul 30, 2015 at 12:59 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: IIRC, historicaly Git allowed some weirdly named refs which made some commands

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-08-19 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Thu, Jul 30, 2015 at 12:59 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: IIRC, historicaly Git allowed some weirdly named refs which made some commands ambiguous (e.g. a branch named after an option like '-d'). We're forbidding their

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-08-03 Thread Karthik Nayak
On Thu, Jul 30, 2015 at 12:59 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: Solving this doesn't seem much harder than diff --git a/ref-filter.c b/ref-filter.c index 6c0189f..a4df287 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1117,7

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-30 Thread Karthik Nayak
On Wed, Jul 29, 2015 at 9:26 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: I'm not sure what's the convention, but I think the test description should give

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-30 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Wed, Jul 29, 2015 at 9:26 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: I'm not sure what's the convention,

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-29 Thread Karthik Nayak
Re-sending this as it wasn't sent as plain text and failed. On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: @@ -458,7 +345,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_array_item *item, }

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-29 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: I'm not sure what's the convention, but I think the test description should give the expected behavior even with test_expect_failure. And please help the reviewers

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-29 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: - qsort(array.items, index, sizeof(struct ref_array_item *), ref_cmp); + if (!sorting) { + def_sorting.next = NULL; +

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-29 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 7:47 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: I'm not sure what's the convention, but I think the test description should give the expected behavior even with test_expect_failure. And please help the reviewers by saying what's the status wrt this test (any

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Jacob Keller
On Tue, Jul 28, 2015 at 12:11 AM, 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. Make 'tag.c' use the 'filter_refs()'

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Christian Couder
On Tue, Jul 28, 2015 at 9:11 AM, Karthik Nayak karthik@gmail.com wrote: diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index a67138a..897cd81 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -11,7 +11,7 @@ SYNOPSIS 'git branch'

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: @@ -458,7 +345,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_array_item *item, } if (item-kind == REF_LOCAL_BRANCH) - fill_tracking_info(stat, item-refname, filter-verbose 1); +

[RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Karthik Nayak
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. Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter' to filter out tags based on the options set. We

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 1:39 PM, Christian Couder christian.cou...@gmail.com wrote: On Tue, Jul 28, 2015 at 9:11 AM, Karthik Nayak karthik@gmail.com wrote: diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index a67138a..897cd81 100644 ---

Re: [RFC/PATCH 10/11] branch.c: use 'ref-filter' APIs

2015-07-28 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 1:27 PM, Jacob Keller jacob.kel...@gmail.com wrote: On Tue, Jul 28, 2015 at 12:11 AM, 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