summaryrefslogtreecommitdiff
path: root/src/transports/smart_protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transports/smart_protocol.c')
-rw-r--r--src/transports/smart_protocol.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index 7c20382dc..e110da07e 100644
--- a/src/transports/smart_protocol.c
+++ b/src/transports/smart_protocol.c
@@ -645,7 +645,7 @@ static int gen_pktline(git_buf *buf, git_push *push)
old_id[GIT_OID_HEXSZ] = '\0'; new_id[GIT_OID_HEXSZ] = '\0';
git_vector_foreach(&push->specs, i, spec) {
- len = 2*GIT_OID_HEXSZ + 7 + strlen(spec->rref);
+ len = 2*GIT_OID_HEXSZ + 7 + strlen(spec->refspec.dst);
if (i == 0) {
++len; /* '\0' */
@@ -657,7 +657,7 @@ static int gen_pktline(git_buf *buf, git_push *push)
git_oid_fmt(old_id, &spec->roid);
git_oid_fmt(new_id, &spec->loid);
- git_buf_printf(buf, "%04"PRIxZ"%s %s %s", len, old_id, new_id, spec->rref);
+ git_buf_printf(buf, "%04"PRIxZ"%s %s %s", len, old_id, new_id, spec->refspec.dst);
if (i == 0) {
git_buf_putc(buf, '\0');
@@ -816,7 +816,7 @@ static int add_ref_from_push_spec(git_vector *refs, push_spec *push_spec)
added->type = GIT_PKT_REF;
git_oid_cpy(&added->head.oid, &push_spec->loid);
- added->head.name = git__strdup(push_spec->rref);
+ added->head.name = git__strdup(push_spec->refspec.dst);
if (!added->head.name ||
git_vector_insert(refs, added) < 0) {
@@ -855,7 +855,7 @@ static int update_refs_from_report(
/* For each push spec we sent to the server, we should have
* gotten back a status packet in the push report which matches */
- if (strcmp(push_spec->rref, push_status->ref)) {
+ if (strcmp(push_spec->refspec.dst, push_status->ref)) {
giterr_set(GITERR_NET, "report-status: protocol error");
return -1;
}
@@ -872,7 +872,7 @@ static int update_refs_from_report(
push_status = git_vector_get(push_report, i);
ref = git_vector_get(refs, j);
- cmp = strcmp(push_spec->rref, ref->head.name);
+ cmp = strcmp(push_spec->refspec.dst, ref->head.name);
/* Iterate appropriately */
if (cmp <= 0) i++;
@@ -985,7 +985,7 @@ int git_smart__push(git_transport *transport, git_push *push)
* cases except when we only send delete commands
*/
git_vector_foreach(&push->specs, i, spec) {
- if (spec->lref) {
+ if (spec->refspec.src && spec->refspec.src[0] != '\0') {
need_pack = 1;
break;
}