X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=refs.c;h=0f3491f871bd692151b42307b833e633b041e948;hb=698ce6f87e0d6db380f7306e190e8586da184577;hp=6c91ae6468f859897a358ebd97f4143e44cda874;hpb=0fa6417c4911e8d252e562d3f58e737d0fdd0228;p=git.git diff --git a/refs.c b/refs.c index 6c91ae64..0f3491f8 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,