X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=receive-pack.c;h=fba4cf82353ff43eae7430c863680f481e03dcb0;hb=5b0d61637c21d80bcc781aa135ed1959326713bb;hp=ed44b897f67a0ef051fa1bf205b2bb5747a1bd67;hpb=14965530727e967806a5c62d7c826104baaec3c0;p=git.git diff --git a/receive-pack.c b/receive-pack.c index ed44b897f..fba4cf823 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -200,6 +200,10 @@ static const char *update(struct command *cmd) } if (is_null_sha1(new_sha1)) { + if (!parse_object(old_sha1)) { + warning ("Allowing deletion of corrupt ref."); + old_sha1 = NULL; + } if (delete_ref(name, old_sha1)) { error("failed to delete %s", name); return "failed to delete";