git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Mike Hommey <mh@glandium.org>
Subject: Re: [PATCH 15/18] http*: add http_get_info_packs
Date: Sun, 24 May 2009 13:43:56 -0700	[thread overview]
Message-ID: <7veiuetenn.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20090524222003.7da46ff8.rctay89@gmail.com

Tay Ray Chuan <rctay89@gmail.com> writes:

> fetch_index has been moved to http.c, and is not meant to be used
> outside of http.c. It invokes end_url_with_slash with base_url;
> apart from that change, the code is identical.

Move fetch_index() to http.c; this is not meant to be ...

> setup_index has been moved and renamed to fetch_http_pack_index.

Move setup_index() to http.c, and rename it to fetch_http_pack_index(), as
it now is a library function and there are many other kinds of "index" in
git.

It makes me wonder if fetch_index(), even though it is static to http.c,
should be renamed somehow to reduce confusion between it and
fetch_http_pack_index().

You have decl-after-statement and a handful of variable that are no longer
used.  Please squash this in when rerolling.

 http-push.c   |    2 --
 http-walker.c |    1 -
 http.c        |   10 +++-------
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/http-push.c b/http-push.c
index b96d7db..74bb48e 100644
--- a/http-push.c
+++ b/http-push.c
@@ -952,8 +952,6 @@ static int add_send_request(struct object *obj, struct remote_lock *lock)
 
 static int fetch_indices(void)
 {
-	struct slot_results results;
-
 	if (push_verbosely)
 		fprintf(stderr, "Getting pack list\n");
 
diff --git a/http-walker.c b/http-walker.c
index 2aed391..c550fd9 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -567,7 +567,6 @@ static void fetch_alternates(struct walker *walker, const char *base)
 static int fetch_indices(struct walker *walker, struct alt_base *repo)
 {
 	int ret = 0;
-	struct slot_results results;
 
 	if (repo->got_indices)
 		return 0;
diff --git a/http.c b/http.c
index ea46075..c74fa26 100644
--- a/http.c
+++ b/http.c
@@ -914,10 +914,10 @@ int fetch_http_pack_index(struct packed_git **packs_head, unsigned char *sha1,
 
 int http_get_info_packs(const char *base_url, struct packed_git **packs_head)
 {
-	int ret = 0;
-	char *url;
+	int ret = 0, i = 0;
+	char *url, *data;
 	struct strbuf buf = STRBUF_INIT;
-	struct http_info_packs_request *req;
+	unsigned char sha1[20];
 
 	end_url_with_slash(&buf, base_url);
 	strbuf_addstr(&buf, "objects/info/packs");
@@ -927,10 +927,6 @@ int http_get_info_packs(const char *base_url, struct packed_git **packs_head)
 	if (ret != HTTP_OK)
 		goto cleanup;
 
-	char *data;
-	int i = 0;
-	unsigned char sha1[20];
-
 	data = buf.buf;
 	while (i < buf.len) {
 		switch (data[i]) {

  reply	other threads:[~2009-05-24 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24 14:20 [PATCH 15/18] http*: add http_get_info_packs Tay Ray Chuan
2009-05-24 20:43 ` Junio C Hamano [this message]
2009-05-29 14:39   ` Tay Ray Chuan

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=7veiuetenn.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    --cc=rctay89@gmail.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 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).