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

Re: [PATCH v2 2/3] git-remote-fd

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 30, 2010, 13:14 UTC
Message-ID
<20100930131440.GE4850@burratino>
In-Reply-To
<1285847579-21954-3-git-send-email-ilari.liusvaara@elisanet.fi>
Hi Ilari,
Ilari Liusvaara wrote:
> This remote helper reflects raw smart remote transport stream back to the
> calling program. This is useful for example if some UI wants to handle
> ssh itself and not use hacks via GIT_SSH.

Do you ever use this directly, or is it a "because we can" sort of thing? Whenever I try to come up with an example, ext:: seems to be easier.

An example (ideally a test) would be nice.
> +++ b/Documentation/git-remote-fd.txt
> @@ -0,0 +1,57 @@
[...]
> +"fd::<fd>[/<anything>]" or "fd::<infd>,<outfd>[/<anything>]" (as URL)
[...]
> +<anything> can be any string. It is ignored. It is meant for provoding
> +information to user in form of "URL".

Is this meant for future expansion? Why not just use a comment in .git/config?

Show 6 quoted lines
> @@ -0,0 +1,57 @@
> +ENVIRONMENT VARIABLES:
> +----------------------
> +
> +$GIT_TRANSLOOP_DEBUG (passed to git)::
> +	If set, prints debugging information about various reads/writes.
For the curious: introduced by patch 1.
> +EXAMPLES:
> +---------
> +"fd::17"::
> +	Connect using socket in file descriptor #17.
Maybe with more context?
	socat ... "git push fd::3 HEAD" ...
> +Documentation
> +--------------
> +Documentation by Ilari Liusvaara.

I think one tends to write "Documentation by <person> and the git list <git@vger.kernel.org>" these days.

Why is this section needed at all? Doesn't the changelog already record the relevant information?

Show 10 quoted lines
> --- /dev/null
> +++ b/builtin/remote-fd.c
> @@ -0,0 +1,88 @@
> +#include "git-compat-util.h"
> +#include "transport.h"
> +#include <errno.h>
> +#include <stdlib.h>
> +#include <string.h>
> +#include <stdio.h>
> +#include <unistd.h>
Doesn't git-compat-util.h imply these?
> + * The data output to <outfd>/<inoutfd> should be passed unmolested to
> + * git-receive-pack/git-upload-pack/git-upload-archive and output of
> + * git-receive-pack/git-upload-pack/git-upload-archive should be passed
> + * unmolested to <infd>/<inoutfd>.
Maybe worth mentioning in the manual?
> +static int command_loop()
Simple, I like it. :)
Show 8 quoted lines
> +int cmd_remote_fd(int argc, const char **argv, const char *prefix)
> +{
> +	char* end;
> +	unsigned long r;
> +
> +	if (argc < 3) {
> +		fprintf(stderr, "Error: URL missing");
> +		exit(1);
Why not use usage() or die()?  (Just curious.)
Previous: Ævar Arnfjörð BjarmasonNext: Ilari Liusvaara
Message 8 of 13 in “git-remote-fd & git-remote-ext”
  1. 0/3 git-remote-fd & git-remote-extIlari Liusvaara, Sep 30, 2010
  2. 1/3 Add bidirectional_transfer_loop()Ilari Liusvaara, Sep 30, 2010
  3. Jonathan NiederSep 30, 2010
  4. Ilari LiusvaaraSep 30, 2010
  5. Jonathan NiederSep 30, 2010
  6. 2/3 git-remote-fdIlari Liusvaara, Sep 30, 2010
  7. Ævar Arnfjörð BjarmasonSep 30, 2010
  8. Jonathan NiederSep 30, 2010
  9. Ilari LiusvaaraSep 30, 2010
  10. 3/3 git-remote-extIlari Liusvaara, Sep 30, 2010
  11. Jonathan NiederSep 30, 2010
  12. Junio C HamanoSep 30, 2010
  13. Jonathan NiederOct 1, 2010

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.