X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote.c;h=9a88917aab32f32235d0ebaa1ffd0e2f2773a927;hb=4f3d37035a7c735a3b69f962656819f4ff7e4927;hp=bb774d0bcc3f5b3e7a8cdbb29ba43fcaf00f0d4c;hpb=941fd1c041204f30279c175ca9b7252ffcb52ba2;p=git.git diff --git a/remote.c b/remote.c index bb774d0bc..9a88917aa 100644 --- a/remote.c +++ b/remote.c @@ -504,8 +504,11 @@ static int match_explicit(struct ref *src, struct ref *dst, if (!matched_src) errs = 1; - if (dst_value == NULL) + if (!dst_value) { + if (!matched_src) + return errs; dst_value = matched_src->name; + } switch (count_refspec_match(dst_value, dst, &matched_dst)) { case 1: @@ -626,6 +629,8 @@ int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail, hashcpy(dst_peer->new_sha1, src->new_sha1); } dst_peer->peer_ref = src; + if (pat) + dst_peer->force = pat->force; free_name: free(dst_name); }