git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] daemon: Skip unknown "extra arg" information

From
Sergey Vlasov <vsu@altlinux.ru>
Date
Jun 5, 2009, 13:16 UTC
Message-ID
<20090605171627.d92f6060.vsu@altlinux.ru>
In-Reply-To
<20090605013332.GV3355@spearce.org>
On Thu, 4 Jun 2009 18:33:32 -0700 Shawn O. Pearce wrote:
Show 14 quoted lines
> 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).

Previous: Jakub NarebskiNext: Johannes Sixt
Message 5 of 7 in “daemon: Skip unknown "extra arg" information”
  1. daemon: Skip unknown "extra arg" informationShawn O. Pearce, Jun 4, 2009
  2. Junio C HamanoJun 5, 2009
  3. Shawn O. PearceJun 5, 2009
  4. Jakub NarebskiJun 5, 2009
  5. Sergey VlasovJun 5, 2009
  6. Johannes SixtJun 7, 2009
  7. Junio C HamanoJun 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.