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

Re: [RFC/PATCH git-remote-bzr] Adapt to new semantics of remote-helper "import" command

From
Jelmer Vernooij <jelmer@samba.org>
Date
Jan 22, 2012, 23:35 UTC
Message-ID
<4F1C9D4C.6090603@samba.org>
In-Reply-To
<20120122054657.GA25103@burratino>
On 01/22/2012 06:46 AM, Jonathan Nieder wrote:
Show 33 quoted lines
> Git 1.7.7 (commit 9504bc9d, "transport-helper: change import
> semantics", 2011-07-16) incompatibly changed the interface of the
> "import" capability.
>
> Before, git would always send a single import command, which the
> remote helper would respond to with a fast-import stream, terminated
> by end of file, meaning there was no way to fetch multiple refs in one
> connection.  Nowadays, git instead sends a sequence of import lines:
>
> 	import refs/heads/foo
> 	import refs/heads/bar
>
> terminated by a blank line.  The helper is to respond with a
> fast-import stream terminated by the "done" command and process
> further commands until another blank line indicates the end of the
> command stream.
> ---
> Hi Simon and Gabriel,
>
> Here's a rough patch against git://github.com/lelutin/git-remote-bzr.git
> master.
>
> Without this patch, whenever I try to use "git clone bzr::<something>",
> after doing all the work it removes the resulting repo and exits with
> status 141 (SIGPIPE).  Maybe the transport-helper should mask SIGPIPE
> when writing the final newline to avoid that.
>
> I'd have prefered to write a patch for remote-bzr that works with
> older versions of git fast-import, too, but it wasn't obvious how.
> Hints welcome.
>
> BTW, would you mind if I sent a patch to include git-remote-bzr in
> git.git under contrib/?

Please note that the bzr-git package, which provides git integration for bzr and vice versa, also includes a 'git-remote-bzr' command. Apart from the 'import' command, it includes experimental implementations of 'fetch' and push as well.

It would be nice to consolidate the efforts, or at the very least prevent name clashes.

Cheers,
Jelmer
Previous: Jonathan NiederNext: Jonathan Nieder
Message 2 of 4 in “Adapt to new semantics of remote-helper "import" command”
  1. Adapt to new semantics of remote-helper "import" commandJonathan Nieder, Jan 22, 2012
  2. Jelmer VernooijJan 22, 2012
  3. Jonathan NiederJan 23, 2012
  4. Gabriel FilionFeb 3, 2012

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.