From: Shawn Pearce <spearce@spearce.org>
To: git@vger.kernel.org
Subject: [RFC 1/5] Remove unnecessary local in get_ref_sha1.
Date: Wed, 17 May 2006 05:54:46 -0400 [thread overview]
Message-ID: <20060517095446.GB28529@spearce.org> (raw)
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
next reply other threads:[~2006-05-17 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 9:54 Shawn Pearce [this message]
2006-05-17 10:43 ` [RFC 1/5] Remove unnecessary local in get_ref_sha1 Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060517095446.GB28529@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).