From: Jonathan Nieder <jrnieder@gmail.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 2/3] git-remote-fd
Date: Thu, 30 Sep 2010 08:14:40 -0500 [thread overview]
Message-ID: <20100930131440.GE4850@burratino> (raw)
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?
> @@ -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?
> --- /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. :)
> +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.)
next prev parent reply other threads:[~2010-09-30 13:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 11:52 [PATCH v2 0/3] git-remote-fd & git-remote-ext Ilari Liusvaara
2010-09-30 11:52 ` [PATCH v2 1/3] Add bidirectional_transfer_loop() Ilari Liusvaara
2010-09-30 13:55 ` Jonathan Nieder
2010-09-30 15:51 ` Ilari Liusvaara
2010-09-30 15:51 ` Jonathan Nieder
2010-09-30 11:52 ` [PATCH v2 2/3] git-remote-fd Ilari Liusvaara
2010-09-30 12:04 ` Ævar Arnfjörð Bjarmason
2010-09-30 13:14 ` Jonathan Nieder [this message]
2010-09-30 13:44 ` Ilari Liusvaara
2010-09-30 11:52 ` [PATCH v2 3/3] git-remote-ext Ilari Liusvaara
2010-09-30 13:45 ` Jonathan Nieder
2010-09-30 20:03 ` Junio C Hamano
2010-10-01 0:30 ` Jonathan Nieder
Reply instructions:
You may reply publicly 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100930131440.GE4850@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=ilari.liusvaara@elisanet.fi \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).