git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] daemon: Skip unknown "extra arg" information
Date: Fri, 5 Jun 2009 17:16:27 +0400
Message-ID: <20090605171627.d92f6060.vsu@altlinux.ru> (raw)
In-Reply-To: <20090605013332.GV3355@spearce.org>

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On Thu, 4 Jun 2009 18:33:32 -0700 Shawn O. Pearce wrote:

> Junio C Hamano <gitster@pobox.com> wrote:
> > "Shawn O. Pearce" <spearce@spearce.org> writes:
> > 
> > > If we don't recognize an extra arg supplied hidden behind the
> > > command, we should skip it and look at the next extra arg, in
> > > case we recognize the next one.
> > >
> > > For example, we currently don't recognize the "user=" extra arg,
> > > but we should still be able to start this connection anyway:
> > 
> > I do not necessarily agree 100% with that argument.
> 
> Actually, we're already f'kd.  We can't change the protocol like
> we had hoped.

There is always a place for another ugly workaround :)

Add an extra \0 before additional parameters:

  "\0host=example.com\0\0param1=value1\0param2=value2\0"

(the buggy loop will still terminate on double \0, and maybe the code
we will add to parse the rest of data will work correctly).

This will be enough for optional parameters (when the old server may
silently ignore them without breaking the protocol).  For mandatory
parameters a change in the preceding "git-upload-pack" part will be
necessary (like the "git://v2" suggestion).

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 22:08 Shawn O. Pearce
2009-06-05  0:50 ` Junio C Hamano
2009-06-05  1:33   ` Shawn O. Pearce
2009-06-05  8:41     ` Jakub Narebski
2009-06-05 13:16     ` Sergey Vlasov [this message]
2009-06-07 18:56     ` Johannes Sixt
2009-06-07 20:29       ` Junio C Hamano

Reply instructions:

You may reply publically 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090605171627.d92f6060.vsu@altlinux.ru \
    --to=vsu@altlinux.ru \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox