Re: PATCH] http-push: refactor request url creation
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 24, 2009, 17:03 UTC
- Message-ID
- <alpine.DEB.1.00.0901241758200.13232@racer>
- In-Reply-To
- <be6fef0d0901240816r25e6a9c9q2d437d413a524362@mail.gmail.com>
Hi,
On Sun, 25 Jan 2009, Ray Chuan wrote:
Show 8 quoted lines
> Currently, functions that deal with objects on the remote repository > have to allocate and do strcpys to generate the URL. > > This patch saves them this trouble, by providing a function that > returns a URL: either the object's 2-digit hex directory (eg. > /objects/a1/) or the complete object location (eg. /objects/a1/b2). > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make that an Acked-by: okay?
Show 10 quoted lines
> diff --git a/http-push.c b/http-push.c
> index cb5bf95..715954e 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -177,6 +177,16 @@ struct remote_ls_ctx
> struct remote_ls_ctx *parent;
> };
>
> +static char *get_remote_object_url(const char *url, const char *hex,
> int only_two_digit_postfix) {It is actually a prefix.
Ciao, Dscho