summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-02-17 17:00:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-02-17 19:23:48 (GMT)
commitfb5a6bb61c215546b94156bbb54d43225424f7d0 (patch)
treee157715e73f2e574d82205e7a8a06b40a205f377 /builtin/receive-pack.c
parent1d147bdff0b8132d3aa53a46df8dbab7b673b796 (diff)
downloadgit-fb5a6bb61c215546b94156bbb54d43225424f7d0.zip
git-fb5a6bb61c215546b94156bbb54d43225424f7d0.tar.gz
git-fb5a6bb61c215546b94156bbb54d43225424f7d0.tar.bz2
ref_transaction_delete(): remove "have_old" parameter
Instead, verify the reference's old value if and only if old_sha1 is non-NULL. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 0be50e9..70e9ce5 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -953,8 +953,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
if (ref_transaction_delete(transaction,
namespaced_name,
old_sha1,
- 0, old_sha1 != NULL,
- "push", &err)) {
+ 0, "push", &err)) {
rp_error("%s", err.buf);
strbuf_release(&err);
return "failed to delete";