X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=remote.c;h=4b5b90597999cb836979338d84d1c5d4748c96e7;hb=e4d1afbcf2e39a997ae90befd629ee53e444c4c9;hp=733ba57494715e00427350af4175fe67c390ec34;hpb=e6c7c2cc9766434607b8da5db872e7881a043925;p=git.git diff --git a/remote.c b/remote.c index 733ba5749..4b5b90597 100644 --- a/remote.c +++ b/remote.c @@ -1038,7 +1038,7 @@ static int match_explicit(struct ref *src, struct ref *dst, case 0: if (!memcmp(dst_value, "refs/", 5)) matched_dst = make_linked_ref(dst_value, dst_tail); - else if((dst_guess = guess_ref(dst_value, matched_src))) + else if ((dst_guess = guess_ref(dst_value, matched_src))) matched_dst = make_linked_ref(dst_guess, dst_tail); else error("unable to push to unqualified destination: %s\n" @@ -1277,7 +1277,7 @@ struct ref *get_remote_ref(const struct ref *remote_refs, const char *name) static struct ref *get_local_ref(const char *name) { - if (!name) + if (!name || name[0] == '\0') return NULL; if (!prefixcmp(name, "refs/"))