Merge branch 'cc/trailers-corner-case-fix' into maint
[gitweb.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;