[RFC 1/5] Remove unnecessary local in get_ref_sha1.

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:42:26
Subsystem: the rest · Maintainer: Linus Torvalds

Remove unnecessary local in get_ref_sha1.

Signed-off-by: Shawn O. Pearce <redacted>

---

 refs.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

339dddea51656af46f6c8a2fba7f50d96ae2a434
diff --git a/refs.c b/refs.c
index 6c91ae6..0f3491f 100644
--- a/refs.c
+++ b/refs.c
@@ -220,12 +220,9 @@ static char *ref_lock_file_name(const ch
 
 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,
-- 
1.3.2.g7278
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help