Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
remote: convert match_explicit_refs to take a struct refspec
author
Brandon Williams
<bmwill@google.com>
Wed, 16 May 2018 22:58:14 +0000
(15:58 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 17 May 2018 21:19:44 +0000
(06:19 +0900)
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 <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f3acb83
)
diff --git
a/remote.c
b/remote.c
index 9eb79ea19716a983ac0fba0d9253da47cbf8232d..84dda3fd08ed2db94eb2c735a468282566c83a92 100644
(file)
--- a/
remote.c
+++ b/
remote.c
@@
-1073,12
+1073,11
@@
static int match_explicit(struct ref *src, struct ref *dst,
}
static int match_explicit_refs(struct ref *src, struct ref *dst,
}
static int match_explicit_refs(struct ref *src, struct ref *dst,
- struct ref ***dst_tail, struct refspec_item *rs,
- int rs_nr)
+ struct ref ***dst_tail, struct refspec *rs)
{
int i, errs;
{
int i, errs;
- for (i = errs = 0; i < rs
_
nr; i++)
- errs += match_explicit(src, dst, dst_tail, &rs[i]);
+ for (i = errs = 0; i < rs
->
nr; i++)
+ errs += match_explicit(src, dst, dst_tail, &rs
->items
[i]);
return errs;
}
return errs;
}
@@
-1302,7
+1301,7
@@
int match_push_refs(struct ref *src, struct ref **dst,
refspec = default_refspec;
}
refspec_appendn(&rs, refspec, nr_refspec);
refspec = default_refspec;
}
refspec_appendn(&rs, refspec, nr_refspec);
- errs = match_explicit_refs(src, *dst, &dst_tail,
rs.items, rs.nr
);
+ errs = match_explicit_refs(src, *dst, &dst_tail,
&rs
);
/* pick the remainder */
for (ref = src; ref; ref = ref->next) {
/* pick the remainder */
for (ref = src; ref; ref = ref->next) {