All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Dmitry Ivankov <divanorama@gmail.com>,
	Jeff King <peff@peff.net>,
	Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: [PATCH/RFC] fast-import doc: deadlock avoidance in bidirectional mode
Date: Wed, 11 Apr 2012 10:32:32 -0700	[thread overview]
Message-ID: <7vlim2kwcv.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120411171707.GD4248@burratino> (Jonathan Nieder's message of "Wed, 11 Apr 2012 12:17:07 -0500")

Jonathan Nieder <jrnieder@gmail.com> writes:

> How about this?

I find all the explanation above this line (elided) understandable and
sensible.

The expected use of --cat-blob-fd is to loop it back to the frontend, and
that is obvious to _us_, but there is nothing in the existing text (or the
text added by this patch) that suggests that fact to the first time
reader.  "Frontends must consume" may not "click" without that knowledge.

>  Documentation/git-fast-import.txt |   13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
> index ec6ef311..0ea649f4 100644
> --- a/Documentation/git-fast-import.txt
> +++ b/Documentation/git-fast-import.txt
> @@ -942,6 +942,12 @@ This command can be used anywhere in the stream that comments are
>  accepted.  In particular, the `cat-blob` command can be used in the
>  middle of a commit but not in the middle of a `data` command.
>  
> +While in some cases the 'cat-blob' result will fit in the pipe buffer,
> +allowing fast-import to continue processing additional commands, this
> +is not guaranteed.  Frontends must consume the cat-blob response
> +completely before performing any writes to fast-import that might
> +block.
> +
>  `ls`
>  ~~~~
>  Prints information about the object at a path to a file descriptor
> @@ -975,7 +981,12 @@ Reading from a named tree::
>  
>  See `filemodify` above for a detailed description of `<path>`.
>  
> -Output uses the same format as `git ls-tree <tree> {litdd} <path>`:
> +While in some cases the 'ls' response will fit in the pipe buffer,
> +allowing fast-import to continue processing additional commands, this
> +is not guaranteed.  Frontends must consume the ls response completely
> +before performing any writes to fast-import that might block.
> +
> +The 'ls' response uses the same format as `git ls-tree <tree> {litdd} <path>`:
>  
>  ====
>  	<mode> SP ('blob' | 'tree' | 'commit') SP <dataref> HT <path> LF

  reply	other threads:[~2012-04-11 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 14:32 [PATCH/RFC] remote-helpers: set up a pipe to read fast-import response Jonathan Nieder
2012-04-11 16:10 ` Junio C Hamano
2012-04-11 17:17   ` [PATCH/RFC] fast-import doc: deadlock avoidance in bidirectional mode Jonathan Nieder
2012-04-11 17:32     ` Junio C Hamano [this message]
2012-04-11 21:25       ` [PATCH/RFC v2] fast-import doc: cat-blob and ls responses need to be consumed quickly Jonathan Nieder
2012-04-11 21:32         ` Junio C Hamano
2012-04-11 21:46           ` 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=7vlim2kwcv.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=divanorama@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=srabbelier@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.