diff options
Diffstat (limited to 'builtin/update-ref.c')
-rw-r--r-- | builtin/update-ref.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/update-ref.c b/builtin/update-ref.c index 1ad6ce1877..226995f029 100644 --- a/builtin/update-ref.c +++ b/builtin/update-ref.c @@ -265,8 +265,9 @@ static const char *parse_cmd_delete(struct ref_transaction *transaction, if (*next != line_termination) die("delete %s: extra input: %s", refname, next); - if (ref_transaction_delete(transaction, refname, old_sha1, - update_flags, have_old, msg, &err)) + if (ref_transaction_delete(transaction, refname, + have_old ? old_sha1 : NULL, + update_flags, msg, &err)) die("%s", err.buf); update_flags = 0; |