Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Documentation: describe -i/--info option to "git-help"
[gitweb.git]
/
receive-pack.c
diff --git
a/receive-pack.c
b/receive-pack.c
index ed44b897f67a0ef051fa1bf205b2bb5747a1bd67..fba4cf82353ff43eae7430c863680f481e03dcb0 100644
(file)
--- 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";