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>
This commit is contained in:

committed by
Junio C Hamano

parent
43a2dfde76
commit
64da41993a
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user