Re: [PATCH] http-push: refactor request url creation
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 1, 2009, 22:45 UTC
- Message-ID
- <alpine.DEB.1.00.0902012341310.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <4983929B.2010901@gmail.com>
Hi,
On Sat, 31 Jan 2009, Tay Ray Chuan wrote:
> * split "append_remote_object_url" signature across 3 lines at Dscho's suggestion
This line is longer than 80 characters (and I seem to remember that the recommended maximum for emails is even less than that).
Show 16 quoted lines
>
> http-push.c | 62 +++++++++++++++++++++++-----------------------------------
> 1 files changed, 25 insertions(+), 37 deletions(-)
>
> diff --git a/http-push.c b/http-push.c
> index 59037df..ba217fc 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -209,6 +209,22 @@ static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum d
> return dav_headers;
> }
>
> +static void append_remote_object_url(struct strbuf *buf, const char *url,
> + const char *hex,
> + int only_two_digit_prefix)
> +{Fine. You changed that, although I find the indentation rather funny, too. I would have expected one tab and then the rest of the signature.
Show 6 quoted lines
> + strbuf_addf(buf, "%sobjects/%.*s/", url, 2, hex); > + if (!only_two_digit_prefix) > + strbuf_addf(buf, "%s", hex+2); > +} > + > +static char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix)
But this is still too long. And no, I will not go through your patch and point out every too-long line; I'll expect you to do that yourself...
Ciao, Dscho