Change prettify_ref to prettify_refname

In preparation to be used when the ref object is not available

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras
2009-05-14 00:22:04 +03:00
committed by Junio C Hamano
parent f01f1099f4
commit 4577e48364
5 changed files with 7 additions and 8 deletions

3
refs.c
View File

@ -750,9 +750,8 @@ int check_ref_format(const char *ref)
}
}
const char *prettify_ref(const struct ref *ref)
const char *prettify_refname(const char *name)
{
const char *name = ref->name;
return name + (
!prefixcmp(name, "refs/heads/") ? 11 :
!prefixcmp(name, "refs/tags/") ? 10 :