提交 70e1a880 编写于 作者: S Shawn Pearce 提交者: Junio C Hamano

Remove unnecessary local in get_ref_sha1.

Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 6cdfd179
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册