From: Shawn Pearce Date: Wed, 17 May 2006 09:54:46 +0000 (-0400) Subject: Remove unnecessary local in get_ref_sha1. X-Git-Tag: v1.4.0-rc1~11^2~20 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=70e1a880a3dc3648fbed463044358a4a83116743;p=git.git Remove unnecessary local in get_ref_sha1. Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/refs.c b/refs.c index 6c91ae646..0f3491f87 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,