]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/receive-pack.c
Merge branch 'jx/do-not-crash-receive-pack-wo-head' into maint
[thirdparty/git.git] / builtin / receive-pack.c
index 94d05717766151e6b183e2c21d279e72812aeb03..04cb5a1a060ae0f26d9d49eb02b57408b9c71929 100644 (file)
@@ -911,7 +911,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
                        return "deletion prohibited";
                }
 
-               if (!strcmp(namespaced_name, head_name)) {
+               if (head_name && !strcmp(namespaced_name, head_name)) {
                        switch (deny_delete_current) {
                        case DENY_IGNORE:
                                break;