]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs/refs-internal.h
add_update(): initialize the whole ref_update
[thirdparty/git.git] / refs / refs-internal.h
index 9686e609425f354b1517060f64122587568b4b3c..babdf2769f752ae5878367c3faf90021a3c67e9e 100644 (file)
@@ -157,6 +157,20 @@ struct ref_update {
        const char refname[FLEX_ARRAY];
 };
 
+/*
+ * Add a ref_update with the specified properties to transaction, and
+ * return a pointer to the new object. This function does not verify
+ * that refname is well-formed. new_sha1 and old_sha1 are only
+ * dereferenced if the REF_HAVE_NEW and REF_HAVE_OLD bits,
+ * respectively, are set in flags.
+ */
+struct ref_update *ref_transaction_add_update(
+               struct ref_transaction *transaction,
+               const char *refname, unsigned int flags,
+               const unsigned char *new_sha1,
+               const unsigned char *old_sha1,
+               const char *msg);
+
 /*
  * Transaction states.
  * OPEN:   The transaction is in a valid state and can accept new updates.