branch.c: use 'ref-filter' data structures

Make 'branch.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process of
porting 'branch.c' to use 'ref-filter' APIs.

This is a temporary step before porting 'branch.c' to use 'ref-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 <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Karthik Nayak
2015-09-23 23:41:11 +05:30
committed by Junio C Hamano
parent ca41799068
commit 1511b22d40
2 changed files with 133 additions and 189 deletions

View File

@ -36,6 +36,7 @@ struct ref_array_item {
unsigned char objectname[20];
int flag;
unsigned int kind;
int ignore : 1; /* To be removed in the next patch */
const char *symref;
struct commit *commit;
struct atom_value *value;
@ -45,6 +46,7 @@ struct ref_array_item {
struct ref_array {
int nr, alloc;
struct ref_array_item **items;
struct rev_info *revs;
};
struct ref_filter {
@ -60,9 +62,12 @@ struct ref_filter {
struct commit *merge_commit;
unsigned int with_commit_tag_algo : 1,
match_as_path : 1;
match_as_path : 1,
detached : 1;
unsigned int kind,
lines;
int abbrev,
verbose;
};
struct ref_filter_cbdata {