summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-02-17 18:00:16 +0100
committerJunio C Hamano <gitster@pobox.com>2015-02-17 11:23:48 -0800
commitfb5a6bb61c215546b94156bbb54d43225424f7d0 (patch)
treee157715e73f2e574d82205e7a8a06b40a205f377 /refs.h
parent1d147bdff0b8132d3aa53a46df8dbab7b673b796 (diff)
downloadgit-fb5a6bb61c215546b94156bbb54d43225424f7d0.tar.gz
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 'refs.h')
-rw-r--r--refs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/refs.h b/refs.h
index dced4c9464..100731d1c8 100644
--- a/refs.h
+++ b/refs.h
@@ -295,8 +295,8 @@ int ref_transaction_create(struct ref_transaction *transaction,
struct strbuf *err);
/*
- * Add a reference deletion to transaction. If have_old is true, then
- * old_sha1 holds the value that the reference should have had before
+ * Add a reference deletion to transaction. If old_sha1 is non-NULL, then
+ * it holds the value that the reference should have had before
* the update (which must not be the null SHA-1).
* Function returns 0 on success and non-zero on failure. A failure to delete
* means that the transaction as a whole has failed and will need to be
@@ -305,7 +305,7 @@ int ref_transaction_create(struct ref_transaction *transaction,
int ref_transaction_delete(struct ref_transaction *transaction,
const char *refname,
const unsigned char *old_sha1,
- unsigned int flags, int have_old, const char *msg,
+ unsigned int flags, const char *msg,
struct strbuf *err);
/*