summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 750ef42)
raw | patch | inline | side by side (parent: 750ef42)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Mon, 19 Apr 2010 14:46:43 +0000 (22:46 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Apr 2010 00:57:50 +0000 (17:57 -0700) |
Now that the temporary variable char *filename is only used in one
place, do away with it and just call sha1_pack_name() directly.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
place, do away with it and just call sha1_pack_name() directly.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c | patch | blob | history |
index 0813c9ecd8553e5bbae8ebc504401afc11e2bc27..e41fcc380034943d1f7bd80661febd42af6f4104 100644 (file)
--- a/http.c
+++ b/http.c
struct http_pack_request *new_http_pack_request(
struct packed_git *target, const char *base_url)
{
- char *filename;
long prev_posn = 0;
char range[RANGE_HEADER_SIZE];
struct strbuf buf = STRBUF_INIT;
sha1_to_hex(target->sha1));
preq->url = strbuf_detach(&buf, NULL);
- filename = sha1_pack_name(target->sha1);
- snprintf(preq->tmpfile, sizeof(preq->tmpfile), "%s.temp", filename);
+ snprintf(preq->tmpfile, sizeof(preq->tmpfile), "%s.temp",
+ sha1_pack_name(target->sha1));
preq->packfile = fopen(preq->tmpfile, "a");
if (!preq->packfile) {
error("Unable to open local file %s for pack",