summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:31 (GMT)
commit0baebca51eba05dd3c3e9edf18fc49c67b55503f (patch)
tree0b73980dac06af9d2eaf5f377e1a8ca1ab1db841 /builtin/receive-pack.c
parent0c5470652861da01d0cff99d5bcd15cefba693f2 (diff)
parentb112b14d7869bf3c000abb84cd22e57dd811d031 (diff)
downloadgit-0baebca51eba05dd3c3e9edf18fc49c67b55503f.zip
git-0baebca51eba05dd3c3e9edf18fc49c67b55503f.tar.gz
git-0baebca51eba05dd3c3e9edf18fc49c67b55503f.tar.bz2
Merge branch 'jx/do-not-crash-receive-pack-wo-head'
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/receive-pack.c')
-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 4ced2eb..e6b93d0 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -933,7 +933,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;