git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 1/5] Remove unnecessary local in get_ref_sha1.
@ 2006-05-17  9:54 Shawn Pearce
  2006-05-17 10:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Pearce @ 2006-05-17  9:54 UTC (permalink / raw)
  To: git

Remove unnecessary local in get_ref_sha1.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

---

 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC 1/5] Remove unnecessary local in get_ref_sha1.
  2006-05-17  9:54 [RFC 1/5] Remove unnecessary local in get_ref_sha1 Shawn Pearce
@ 2006-05-17 10:43 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2006-05-17 10:43 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: git

Shawn Pearce <spearce@spearce.org> writes:

> Remove unnecessary local in get_ref_sha1.
>
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Ack.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-17 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17  9:54 [RFC 1/5] Remove unnecessary local in get_ref_sha1 Shawn Pearce
2006-05-17 10:43 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).