Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
receive-pack: crash when checking with non-exist HEAD
[gitweb.git]
/
builtin
/
receive-pack.c
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index c3230817db4a7676eb74335b254f30597e66edd9..2380127c91db0ff0a6cb56995c03ea9bc0b52c77 100644
(file)
--- a/
builtin/receive-pack.c
+++ b/
builtin/receive-pack.c
@@
-514,7
+514,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;