diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index b1706a5731..f589e8aebf 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1137,7 +1137,7 @@ static const char *update(struct command *cmd, struct shallow_info *si) } if (ref_transaction_delete(transaction, namespaced_name, - old_oid->hash, + old_oid ? old_oid->hash : NULL, 0, "push", &err)) { rp_error("%s", err.buf); strbuf_release(&err);