aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/push.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-05-16 15:58:00 -0700
committerJunio C Hamano <gitster@pobox.com>2018-05-18 06:19:42 +0900
commit6bdb304b106db32b1cff185f2fa1b79e9c2c919c (patch)
treeeae9ab1c184a94f3c033907dbb5f2a74d88cf652 /builtin/push.c
parent16eefc8eb37dfb26c83bbd0a393b494e3734cb97 (diff)
downloadgit-6bdb304b106db32b1cff185f2fa1b79e9c2c919c.tar.gz
remote: convert push refspecs to struct refspec
Convert the set of push refspecs stored in 'struct remote' to use 'struct refspec'. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/push.c b/builtin/push.c
index 00d81fb1dd..509dc66772 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -79,11 +79,11 @@ static const char *map_refspec(const char *ref,
if (count_refspec_match(ref, local_refs, &matched) != 1)
return ref;
- if (remote->push) {
+ if (remote->push.nr) {
struct refspec_item query;
memset(&query, 0, sizeof(struct refspec_item));
query.src = matched->name;
- if (!query_refspecs(remote->push, remote->push_refspec_nr, &query) &&
+ if (!query_refspecs(remote->push.items, remote->push.nr, &query) &&
query.dst) {
struct strbuf buf = STRBUF_INIT;
strbuf_addf(&buf, "%s%s:%s",
@@ -436,9 +436,9 @@ static int do_push(const char *repo, int flags,
}
if (!refspec && !(flags & TRANSPORT_PUSH_ALL)) {
- if (remote->push_refspec_nr) {
- refspec = remote->push_refspec;
- refspec_nr = remote->push_refspec_nr;
+ if (remote->push.raw_nr) {
+ refspec = remote->push.raw;
+ refspec_nr = remote->push.raw_nr;
} else if (!(flags & TRANSPORT_PUSH_MIRROR))
setup_default_push_refspecs(remote);
}