mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
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
This commit is contained in:
commit
17850efa5f
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue