aboutsummaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 16:17:32 +0200
committerJunio C Hamano <gitster@pobox.com>2017-05-23 14:29:51 +0900
commitfd2ce9c01c91a093fbc8f7e444d4d80c0d89432a (patch)
treea3f5143ac6bf0406d1a1d035ecae9b66af22fe62 /refs.h
parent23739aa2b3d2546c3b3ff0e06eb5171b37e31a90 (diff)
downloadgit-fd2ce9c01c91a093fbc8f7e444d4d80c0d89432a.tar.gz
git-fd2ce9c01c91a093fbc8f7e444d4d80c0d89432a.tar.xz
refs.h: clarify docstring for the ref_transaction_update()-related fns
In particular, make it clear that they make copies of the sha1 arguments. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 685a979a0..ec8c6bfbb 100644
--- a/refs.h
+++ b/refs.h
@@ -427,6 +427,19 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err);
*
* refname -- the name of the reference to be affected.
*
+ * new_sha1 -- the SHA-1 that should be set to be the new value of
+ * the reference. Some functions allow this parameter to be
+ * NULL, meaning that the reference is not changed, or
+ * null_sha1, meaning that the reference should be deleted. A
+ * copy of this value is made in the transaction.
+ *
+ * old_sha1 -- the SHA-1 value that the reference must have before
+ * the update. Some functions allow this parameter to be NULL,
+ * meaning that the old value of the reference is not checked,
+ * or null_sha1, meaning that the reference must not exist
+ * before the update. A copy of this value is made in the
+ * transaction.
+ *
* flags -- flags affecting the update, passed to
* update_ref_lock(). Can be REF_NODEREF, which means that
* symbolic references should not be followed.