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:
Michael Haggerty
2017-05-22 16:17:38 +02:00
committed by Junio C Hamano
parent 43a2dfde76
commit 64da41993a
9 changed files with 23 additions and 19 deletions

View File

@ -786,7 +786,7 @@ static int rm(int argc, const char **argv)
strbuf_release(&buf);
if (!result)
result = delete_refs(&branches, REF_NODEREF);
result = delete_refs("remote: remove", &branches, REF_NODEREF);
string_list_clear(&branches, 0);
if (skipped.nr) {
@ -1301,7 +1301,7 @@ static int prune_remote(const char *remote, int dry_run)
string_list_sort(&refs_to_prune);
if (!dry_run)
result |= delete_refs(&refs_to_prune, 0);
result |= delete_refs("remote: prune", &refs_to_prune, 0);
for_each_string_list_item(item, &states.stale) {
const char *refname = item->util;