diff --git a/remote.c b/remote.c
index 733ba57494715e00427350af4175fe67c390ec34..4b5b90597999cb836979338d84d1c5d4748c96e7 100644 (file)
--- a/remote.c
+++ b/remote.c
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"
static struct ref *get_local_ref(const char *name)
{
- if (!name)
+ if (!name || name[0] == '\0')
return NULL;
if (!prefixcmp(name, "refs/"))