diff options
Diffstat (limited to 'receive-pack.c')
-rw-r--r-- | receive-pack.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/receive-pack.c b/receive-pack.c index ed44b897f6..fba4cf8235 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"; |