aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-02-17 18:00:15 +0100
committerJunio C Hamano <gitster@pobox.com>2015-02-17 11:22:50 -0800
commit1d147bdff0b8132d3aa53a46df8dbab7b673b796 (patch)
treebc10a34c8136b89c3e646bb9eb1d6ea840f9376b /refs.h
parent8df4e51138781927962438819d79ae3221b527b5 (diff)
downloadgit-1d147bdff0b8132d3aa53a46df8dbab7b673b796.tar.gz
git-1d147bdff0b8132d3aa53a46df8dbab7b673b796.tar.xz
ref_transaction_update(): remove "have_old" parameter
Instead, verify the reference's old value if and only if old_sha1 is non-NULL. ref_transaction_delete() will get the same treatment in a moment. 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 92b85979c..dced4c946 100644
--- a/refs.h
+++ b/refs.h
@@ -265,8 +265,8 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);
/*
* Add a reference update to transaction. new_sha1 is the value that
* the reference should have after the update, or null_sha1 if it should
- * be deleted. If have_old is true, then old_sha1 holds the value
- * that the reference should have had before the update, or zeros if
+ * be deleted. If old_sha1 is non-NULL, then it is the value
+ * that the reference should have had before the update, or null_sha1 if
* it must not have existed beforehand.
* Function returns 0 on success and non-zero on failure. A failure to update
* means that the transaction as a whole has failed and will need to be
@@ -276,7 +276,7 @@ int ref_transaction_update(struct ref_transaction *transaction,
const char *refname,
const unsigned char *new_sha1,
const unsigned char *old_sha1,
- unsigned int flags, int have_old, const char *msg,
+ unsigned int flags, const char *msg,
struct strbuf *err);
/*