From 70e1a880a3dc3648fbed463044358a4a83116743 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 17 May 2006 05:54:46 -0400 Subject: Remove unnecessary local in get_ref_sha1. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- refs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 6c91ae6468..0f3491f871 100644 --- a/refs.c +++ b/refs.c @@ -220,12 +220,9 @@ static char *ref_lock_file_name(const char *ref) int get_ref_sha1(const char *ref, unsigned char *sha1) { - const char *filename; - if (check_ref_format(ref)) return -1; - filename = git_path("refs/%s", ref); - return read_ref(filename, sha1); + return read_ref(git_path("refs/%s", ref), sha1); } static int lock_ref_file(const char *filename, const char *lock_filename, -- cgit v1.2.3