All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Faye-Lund <kusmabite@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, peff@peff.net, j6t@kdbg.org,
	rene.scharfe@lsrfire.ath.cx
Subject: Re: [PATCH v3 4/4] upload-archive: use start_command instead of fork
Date: Mon, 3 Oct 2011 20:48:20 +0200	[thread overview]
Message-ID: <CABPQNSbN-sktYQUkLoywhCkc0_axgjY6Y9sN8ipeu6M+2VOVTA@mail.gmail.com> (raw)
In-Reply-To: <7vy5x1gbr6.fsf@alter.siamese.dyndns.org>

On Mon, Oct 3, 2011 at 8:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Erik Faye-Lund <kusmabite@gmail.com> writes:
>
>> Add an undocumented flag to git-archive that tells it that the
>> action originated from a remote, so features can be disabled.
>
>> diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
>> index 2d0b383..c57e8bd 100644
>> --- a/builtin/upload-archive.c
>> +++ b/builtin/upload-archive.c
>> @@ -6,6 +6,7 @@
>>  #include "archive.h"
>>  #include "pkt-line.h"
>>  #include "sideband.h"
>> +#include "run-command.h"
>>
>>  static const char upload_archive_usage[] =
>>       "git upload-archive <repo>";
>> @@ -18,28 +19,17 @@ static const char lostchild[] =
>>
>>  #define MAX_ARGS (64)
>>
>> -static int run_upload_archive(int argc, const char **argv, const char *prefix)
>> +static void prepare_argv(const char **sent_argv, const char **argv)
>>  {
>> -     const char *sent_argv[MAX_ARGS];
>>       const char *arg_cmd = "argument ";
>>       char *p, buf[4096];
>>       int sent_argc;
>>       int len;
>>
>> +     sent_argc = 2;
>> +     sent_argv[0] = "archive";
>> +     sent_argv[1] = "--remote-request";
>>       for (p = buf;;) {
>>               /* This will die if not enough free space in buf */
>>               len = packet_read_line(0, p, (buf + sizeof buf) - p);
>
> Hmm, forgetting the "Windows" for a while, does this client work against
> the remote repositories that are running deployed versions of Git?
>

It should, the change is completely server-side. The first two entries
in sent_argv aren't sent over the network protocol, but the ones that
follow them are.

Or did I misunderstand your concern?

  reply	other threads:[~2011-10-03 18:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 20:59 [PATCH v3 0/4] port upload-archive to Windows Erik Faye-Lund
2011-09-29 20:59 ` [PATCH v3 1/4] compat/win32/sys/poll.c: upgrade from upstream Erik Faye-Lund
2011-09-30 19:00   ` René Scharfe
2011-09-29 20:59 ` [PATCH v3 2/4] mingw: fix compilation of poll-emulation Erik Faye-Lund
2011-09-29 20:59 ` [PATCH v3 3/4] enter_repo: do not modify input Erik Faye-Lund
2011-09-30 19:00   ` René Scharfe
2011-10-04 17:55   ` Phil Hord
2011-10-04 18:00     ` Phil Hord
2011-10-06 13:06     ` Erik Faye-Lund
2011-09-29 20:59 ` [PATCH v3 4/4] upload-archive: use start_command instead of fork Erik Faye-Lund
2011-10-03 18:39   ` Junio C Hamano
2011-10-03 18:48     ` Erik Faye-Lund [this message]
2011-10-03 19:31       ` Junio C Hamano
2011-09-29 21:01 ` [PATCH v3 0/4] port upload-archive to Windows Erik Faye-Lund
2011-09-30 10:46 ` Jeff King

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=CABPQNSbN-sktYQUkLoywhCkc0_axgjY6Y9sN8ipeu6M+2VOVTA@mail.gmail.com \
    --to=kusmabite@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /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.