summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-19 21:41:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-19 21:41:26 (GMT)
commit17850efa5f5c471f622d860e8ebd9f28de3c388e (patch)
treeaf9e8cc9711e145d61f87e201d8ffa29415ce8df /builtin
parent5a30374a29a4ee9725d6ea165ead19a748eaed4c (diff)
parentb112b14d7869bf3c000abb84cd22e57dd811d031 (diff)
downloadgit-17850efa5f5c471f622d860e8ebd9f28de3c388e.zip
git-17850efa5f5c471f622d860e8ebd9f28de3c388e.tar.gz
git-17850efa5f5c471f622d860e8ebd9f28de3c388e.tar.bz2
Merge branch 'jx/do-not-crash-receive-pack-wo-head' into maint
An attempt to delete a ref by pushing into a repositorywhose HEAD symbolic reference points at an unborn branch that cannot be created due to ref D/F conflict (e.g. refs/heads/a/b exists, HEAD points at refs/heads/a) failed. * jx/do-not-crash-receive-pack-wo-head: receive-pack: crash when checking with non-exist HEAD
Diffstat (limited to 'builtin')
-rw-r--r--builtin/receive-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 94d0571..04cb5a1 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -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;