]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.c
fetch: do not create ref from empty name
[thirdparty/git.git] / remote.c
index d66e2f3c93dc72a7112ce101278ae937cc914320..39583d52b9b632a67594acfb4372b6e192200b41 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1254,7 +1254,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/"))