refs: add method to rename refs

This removes the last caller of function get_files_ref_store(), so
remove it.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Turner
2016-09-04 18:08:42 +02:00
committed by Junio C Hamano
parent 6fb5acfd8f
commit 9b6b40d93a
3 changed files with 17 additions and 18 deletions

7
refs.c
View File

@ -1547,3 +1547,10 @@ int delete_refs(struct string_list *refnames, unsigned int flags)
return refs->be->delete_refs(refs, refnames, flags);
}
int rename_ref(const char *oldref, const char *newref, const char *logmsg)
{
struct ref_store *refs = get_ref_store(NULL);
return refs->be->rename_ref(refs, oldref, newref, logmsg);
}