git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Dan McGee <dpmcgee@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] http-push: refactor curl_easy_setup madness
Date: Sun, 17 Apr 2011 02:24:14 +0800	[thread overview]
Message-ID: <BANLkTinv4M7biQ_Wd3rWYbGLSwgGBmhbUA@mail.gmail.com> (raw)
In-Reply-To: <1301535531-1244-2-git-send-email-dpmcgee@gmail.com>

On Thu, Mar 31, 2011 at 9:38 AM, Dan McGee <dpmcgee@gmail.com> wrote:
> We were doing (nearly) the same thing all over the place, in slightly
> different orders, different variable names, etc. Refactor most calls
> into two helper functions, one for GET and one for everything else, that
> do the heavy lifting leaving most callsites a lot cleaner in the
> process.
>
> Signed-off-by: Dan McGee <dpmcgee@gmail.com>

Nice work.

Perhaps you should mention in the commit message that the setting of
CURLOPT_PUT at the callsites of curl_setup_http() which previously
didn't do it (eg. locking_available(), remote_ls()) is ok, since that
option is deprecated in place of, and has the same effect as,
CURLOPT_UPLOAD.

> --- a/http-push.c
> +++ b/http-push.c
> @@ -169,7 +169,7 @@ enum dav_header_flag {
>        DAV_HEADER_TIMEOUT = (1u << 2)
>  };
>
> -static char *xml_entities(char *s)
> +static char *xml_entities(const char *s)
>  {
>        struct strbuf buf = STRBUF_INIT;
>        while (*s) {

Perhaps the addition of "const", and elsewhere in this patch, should
be placed in a separate patch.

--
Cheers,
Ray Chuan

  reply	other threads:[~2011-04-16 18:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31  1:38 [PATCH 1/2] http: make curl callbacks match contracts from curl header Dan McGee
2011-03-31  1:38 ` [PATCH 2/2] http-push: refactor curl_easy_setup madness Dan McGee
2011-04-16 18:24   ` Tay Ray Chuan [this message]
2011-04-04 23:34 ` [PATCH 1/2] http: make curl callbacks match contracts from curl header Junio C Hamano
2011-04-05  1:06   ` [PATCH] " Dan McGee

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=BANLkTinv4M7biQ_Wd3rWYbGLSwgGBmhbUA@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=dpmcgee@gmail.com \
    --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).