Thread (51 messages) flat view 51 messages, 4 authors, 2016-06-15

Re: [PATCH 01/13] fast-import: add the 'done' command

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:49:24

On Sat, 28 Aug 2010, Sverre Rabbelier wrote:
Currently the only way to end an import stream is to close it, which
is not desirable when the stream that's being used is shared. For
example, the remote helper infrastructure uses a pipe between it and
the helper process, part of the protocol is to send a fast-import
stream accross. Without a way to end the stream the remote helper
infrastructure is forced to limit itself to have a command that uses
a fast-import stream as it's last command.

Add a trivial 'done' command that causes fast-import to stop reading
from the stream and exit.
Yeah, this is definitely worthwhile.
---

  Very straightforward. It is handled in parse_feature() instead of
  in parse_one_feature() because I didn't want to allow '--done' as a
  commandline argument. Allowing it would be silly, it surves no
  other purpose than to indicate up front that the stream will
  contain a 'done' command at the end.

  I'm fine too with dropping the feature and just adding the new
  command, whichever is preferred.
I think the point of the feature would be to get the error response up 
front, where it might be easier to determine what to do about importers 
not supporting it. As such, I think the command line option actually makes 
at least as much sense, but it's probably not necessary anyway.

I believe there's a gfi mailing list, which ought to hear about this bit. 
Not that there are likely to be conflicts, but, when I was thinking about 
adding this command (for the same reason you're adding it), I'd called it 
"quit", so it's worth letting people know a de facto standard, so gfi 
implementations don't vary.

The code looks obviously good to me.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help