Re: [RFC/PATCH git-remote-bzr] Adapt to new semantics of remote-helper "import" command
From: Jelmer Vernooij <hidden>
Date: 2016-06-15 22:52:51
On 01/22/2012 06:46 AM, Jonathan Nieder wrote:
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