From: Tay Ray Chuan <rctay89@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: "Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH 0/3] http*: refactor fetching code (v2)
Date: Mon, 18 May 2009 16:30:25 +0800 [thread overview]
Message-ID: <20090518163025.58842505.rctay89@gmail.com> (raw)
This patch series applies on pu.
The major differences between this series and the 11-patch long one
(dated May 15, 2009) are:
*check 'preq' pointer before using it (for fetching packs) [1]
*moved free(url) before 'abort' label to stop -Wuninitialized warning
(for fetching loose objects) [2]
*use unlink_or_warn, after 691f1a2 ("replace direct calls to unlink
(2) with unlink_or_warn")
Junio: I've rebased the patch series on pu, hopefully this stops the
attribute warnings for patch 3.
Tay Ray Chuan (3):
http*: add helper methods for fetching packs
http*: add helper methods for fetching objects/info/packs
http*: add helper methods for fetching objects (loose)
http-push.c | 378 ++++++++--------------------------------------------
http-walker.c | 407 +++++++++++---------------------------------------------
http.c | 415 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
http.h | 72 ++++++++++-
4 files changed, 616 insertions(+), 656 deletions(-)
Footnotes:
[1] @@ -595,17 +595,21 @@ static void finish_request(struct transfer_request *request)
start_fetch_packed(request);
} else if (request->state == RUN_FETCH_PACKED) {
+ int fail = 1;
if (request->curl_result != CURLE_OK) {
fprintf(stderr, "Unable to get pack file %s\n%s",
request->url, curl_errorstr);
- repo->can_update_info_refs = 0;
} else {
preq = (struct http_pack_request *)request->userData;
- if (finish_http_pack_request(preq))
- repo->can_update_info_refs = 0;
+ if (preq) {
+ if (finish_http_pack_request(preq) > 0)
+ fail = 0;
+ release_http_pack_request(preq);
+ }
}
- release_http_pack_request(preq);
+ if (fail)
+ repo->can_update_info_refs = 0;
release_request(request);
}
}
[2] @@ -1167,9 +1167,9 @@ struct http_object_request
*new_http_object_request(const char *base_url,
return freq;
+ free(url);
abort:
free(filename);
- free(url);
free(freq);
return NULL;
}
next reply other threads:[~2009-05-18 8:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 8:30 Tay Ray Chuan [this message]
2009-05-20 7:43 ` [PATCH 0/3] http*: refactor fetching code (v2) Mike Hommey
2009-05-20 10:21 ` Johannes Schindelin
2009-05-20 12:14 ` Tay Ray Chuan
2009-05-22 8:34 ` Clemens Buchacher
2009-05-20 12:10 ` Tay Ray Chuan
2009-05-20 14:03 ` Tony Finch
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=20090518163025.58842505.rctay89@gmail.com \
--to=rctay89@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.