Skip to content

Commit

Permalink
http-push.c: get_remote_object_url() is only used under USE_CURL_MULTI
Browse files Browse the repository at this point in the history
Otherwise -Wunused-function (which is implied by -Wall) triggers.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 3, 2009
1 parent 817d14a commit dcdb333
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,6 @@ static void append_remote_object_url(struct strbuf *buf, const char *url,
strbuf_addf(buf, "%s", hex+2);
}

static char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix)
{
struct strbuf buf = STRBUF_INIT;
append_remote_object_url(&buf, url, hex, only_two_digit_prefix);
return strbuf_detach(&buf, NULL);
}

static void finish_request(struct transfer_request *request);
static void release_request(struct transfer_request *request);

Expand All @@ -237,6 +230,14 @@ static void process_response(void *callback_data)
}

#ifdef USE_CURL_MULTI

static char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix)
{
struct strbuf buf = STRBUF_INIT;
append_remote_object_url(&buf, url, hex, only_two_digit_prefix);
return strbuf_detach(&buf, NULL);
}

static size_t fwrite_sha1_file(void *ptr, size_t eltsize, size_t nmemb,
void *data)
{
Expand Down

0 comments on commit dcdb333

Please sign in to comment.