Skip to content

Commit 9fa2e5e

Browse files
bmwillgitster
authored andcommitted
remote: convert match_explicit_refs to take a struct refspec
Convert 'match_explicit_refs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3acb83 commit 9fa2e5e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

remote.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,12 +1073,11 @@ static int match_explicit(struct ref *src, struct ref *dst,
10731073
}
10741074

10751075
static int match_explicit_refs(struct ref *src, struct ref *dst,
1076-
struct ref ***dst_tail, struct refspec_item *rs,
1077-
int rs_nr)
1076+
struct ref ***dst_tail, struct refspec *rs)
10781077
{
10791078
int i, errs;
1080-
for (i = errs = 0; i < rs_nr; i++)
1081-
errs += match_explicit(src, dst, dst_tail, &rs[i]);
1079+
for (i = errs = 0; i < rs->nr; i++)
1080+
errs += match_explicit(src, dst, dst_tail, &rs->items[i]);
10821081
return errs;
10831082
}
10841083

@@ -1302,7 +1301,7 @@ int match_push_refs(struct ref *src, struct ref **dst,
13021301
refspec = default_refspec;
13031302
}
13041303
refspec_appendn(&rs, refspec, nr_refspec);
1305-
errs = match_explicit_refs(src, *dst, &dst_tail, rs.items, rs.nr);
1304+
errs = match_explicit_refs(src, *dst, &dst_tail, &rs);
13061305

13071306
/* pick the remainder */
13081307
for (ref = src; ref; ref = ref->next) {

0 commit comments

Comments
 (0)