From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: [Resend PATCH 2/4] Use strbuf in http code
Date: Mon, 10 Dec 2007 22:04:52 -0800 [thread overview]
Message-ID: <7vlk81him3.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1197228659-19459-1-git-send-email-mh@glandium.org> (Mike Hommey's message of "Sun, 9 Dec 2007 20:30:59 +0100")
Mike Hommey <mh@glandium.org> writes:
> Also, replace whitespaces with tabs in some places
>
> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---
>
> While this doesn't fix the problem with symbolic refs, it does fail more
> cleanly.
>
> http-push.c | 187 +++++++++++++++++++--------------------------------------
> http-walker.c | 60 +++++++------------
> http.c | 34 ++++------
> http.h | 11 ++--
> transport.c | 18 ++----
> 5 files changed, 109 insertions(+), 201 deletions(-)
I like this code reduction, but
> diff --git a/http.h b/http.h
> index fe1b0d1..bf3f12c 100644
> --- a/http.h
> +++ b/http.h
> @@ -6,6 +6,8 @@
> #include <curl/curl.h>
> #include <curl/easy.h>
>
> +#include "strbuf.h"
> +
> #if LIBCURL_VERSION_NUM >= 0x071000
> #define USE_CURL_MULTI
> #define DEFAULT_MAX_REQUESTS 5
> @@ -48,18 +50,17 @@ struct active_request_slot
>
> struct buffer
> {
> - size_t posn;
> - size_t size;
> - void *buffer;
> + struct strbuf buf;
> + size_t posn;
> };
With this definition of "struct buffer", I do not think this can be correct.
> @@ -1267,10 +1257,8 @@ static struct remote_lock *lock_remote(const char *path, long timeout)
> {
> struct active_request_slot *slot;
> struct slot_results results;
> - struct buffer out_buffer;
> - struct buffer in_buffer;
> - char *out_data;
> - char *in_data;
> + struct buffer out_buffer = { 0, STRBUF_INIT };
How seriously have you proofread and tested this series before sending
it out?
next prev parent reply other threads:[~2007-12-11 6:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-09 17:04 [PATCH 1/4] Cleanup variables in http.[ch] Mike Hommey
2007-12-09 17:04 ` [PATCH 2/4] Use strbuf in http code Mike Hommey
2007-12-09 17:04 ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Mike Hommey
2007-12-09 17:05 ` [PATCH 4/4] Add support for URLs to git-apply Mike Hommey
2007-12-10 9:06 ` [Replacement PATCH " Mike Hommey
2007-12-09 18:27 ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Junio C Hamano
2007-12-09 18:15 ` [PATCH 2/4] Use strbuf in http code Junio C Hamano
2007-12-09 18:24 ` Mike Hommey
2007-12-09 18:36 ` Junio C Hamano
2007-12-09 19:30 ` [Resend PATCH " Mike Hommey
2007-12-11 6:04 ` Junio C Hamano [this message]
2007-12-11 6:16 ` Mike Hommey
2007-12-11 6:25 ` [Replacement " Mike Hommey
2007-12-09 17:17 ` [PATCH] git-send-email.perl: Really add angle brackets to In-Reply-To if necessary Mike Hommey
2007-12-09 17:38 ` Mike Hommey
2007-12-09 18:09 ` Junio C Hamano
2007-12-09 18:14 ` Mike Hommey
2007-12-09 18:21 ` David Kastrup
2007-12-09 18:53 ` Randal L. Schwartz
2007-12-09 19:46 ` David Kastrup
2007-12-09 19:51 ` Randal L. Schwartz
2007-12-09 19:58 ` [Resend PATCH] " Mike Hommey
2007-12-09 18:21 ` [PATCH 1/4] Cleanup variables in http.[ch] 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=7vlk81him3.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mh@glandium.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 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.