aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2006-05-17 05:54:46 -0400
committerJunio C Hamano <junkio@cox.net>2006-05-17 17:33:52 -0700
commit70e1a880a3dc3648fbed463044358a4a83116743 (patch)
treee33529025ba6e4baf23346af8d4603ce7f738140 /refs.c
parent6cdfd1797486138f50f1929c39e77a2cd1e3e033 (diff)
downloadgit-70e1a880a3dc3648fbed463044358a4a83116743.tar.gz
git-70e1a880a3dc3648fbed463044358a4a83116743.tar.xz
Remove unnecessary local in get_ref_sha1.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c5
1 files changed, 1 insertions, 4 deletions
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,