summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 14:17:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-23 05:29:53 (GMT)
commit64da41993a2c33e9187858808d5a6c87e6d6d101 (patch)
tree3fff7e3011f5b90cc60dea2651894beeeeae00a8 /refs.h
parent43a2dfde76a4a47ffa31be11fd5cd7fe0b57bb84 (diff)
downloadgit-64da41993a2c33e9187858808d5a6c87e6d6d101.zip
git-64da41993a2c33e9187858808d5a6c87e6d6d101.tar.gz
git-64da41993a2c33e9187858808d5a6c87e6d6d101.tar.bz2
ref_store: take a `msg` parameter when deleting references
Just because the files backend can't retain reflogs for deleted references is no reason that they shouldn't be supported by the virtual method interface. Also, `delete_ref()` and `refs_delete_ref()` have already gained `msg` parameters. Now let's add them to `delete_refs()` and `refs_delete_refs()`. 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.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/refs.h b/refs.h
index ec8c6bf..b62722f 100644
--- a/refs.h
+++ b/refs.h
@@ -331,7 +331,8 @@ int reflog_exists(const char *refname);
* verify that the current value of the reference is old_sha1 before
* deleting it. If old_sha1 is NULL, delete the reference if it
* exists, regardless of its old value. It is an error for old_sha1 to
- * be NULL_SHA1. flags is passed through to ref_transaction_delete().
+ * be NULL_SHA1. msg and flags are passed through to
+ * ref_transaction_delete().
*/
int refs_delete_ref(struct ref_store *refs, const char *msg,
const char *refname,
@@ -343,12 +344,13 @@ int delete_ref(const char *msg, const char *refname,
/*
* Delete the specified references. If there are any problems, emit
* errors but attempt to keep going (i.e., the deletes are not done in
- * an all-or-nothing transaction). flags is passed through to
+ * an all-or-nothing transaction). msg and flags are passed through to
* ref_transaction_delete().
*/
-int refs_delete_refs(struct ref_store *refs, struct string_list *refnames,
- unsigned int flags);
-int delete_refs(struct string_list *refnames, unsigned int flags);
+int refs_delete_refs(struct ref_store *refs, const char *msg,
+ struct string_list *refnames, unsigned int flags);
+int delete_refs(const char *msg, struct string_list *refnames,
+ unsigned int flags);
/** Delete a reflog */
int refs_delete_reflog(struct ref_store *refs, const char *refname);