X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=receive-pack.c;h=fba4cf82353ff43eae7430c863680f481e03dcb0;hb=bd8ff616c998da8b08bd59b47644408048b3016d;hp=ed44b897f67a0ef051fa1bf205b2bb5747a1bd67;hpb=c4316674c48708ca62876470c615101ab8fee2e0;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";