summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 16:17:38 +0200
committerJunio C Hamano <gitster@pobox.com>2017-05-23 14:29:53 +0900
commit64da41993a2c33e9187858808d5a6c87e6d6d101 (patch)
tree3fff7e3011f5b90cc60dea2651894beeeeae00a8 /refs
parent43a2dfde76a4a47ffa31be11fd5cd7fe0b57bb84 (diff)
downloadgit-64da41993a2c33e9187858808d5a6c87e6d6d101.tar.gz
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')
-rw-r--r--refs/files-backend.c4
-rw-r--r--refs/refs-internal.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b2559b5585..fce8265aa7 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1595,7 +1595,7 @@ static int repack_without_refs(struct files_ref_store *refs,
return ret;
}
-static int files_delete_refs(struct ref_store *ref_store,
+static int files_delete_refs(struct ref_store *ref_store, const char *msg,
struct string_list *refnames, unsigned int flags)
{
struct files_ref_store *refs =
@@ -1627,7 +1627,7 @@ static int files_delete_refs(struct ref_store *ref_store,
for (i = 0; i < refnames->nr; i++) {
const char *refname = refnames->items[i].string;
- if (refs_delete_ref(&refs->base, NULL, refname, NULL, flags))
+ if (refs_delete_ref(&refs->base, msg, refname, NULL, flags))
result |= error(_("could not remove reference %s"), refname);
}
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 7020e51cb7..95edf6f234 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -508,7 +508,7 @@ typedef int create_symref_fn(struct ref_store *ref_store,
const char *ref_target,
const char *refs_heads_master,
const char *logmsg);
-typedef int delete_refs_fn(struct ref_store *ref_store,
+typedef int delete_refs_fn(struct ref_store *ref_store, const char *msg,
struct string_list *refnames, unsigned int flags);
typedef int rename_ref_fn(struct ref_store *ref_store,
const char *oldref, const char *newref,