Subject: [PATCH/RFC v3 resend 0/4] fast-import: Let importers retrieve blobs

From: Jonathan Nieder <[email-masked]>
Date: Sun, 28 Nov 2010 13:41:31 -0600

[resending since git@vger doesn't seem to have accepted the previous
copy.  Sorry for the noise.]

David Barr wrote:

> So introduce another way: a "cat-blob" command introduced in the
> command stream requests for fast-import to print a blob to stdout
> or a file descriptor specified by the argument --cat-blob-fd.
> 
> The output uses the same format as "git cat-file --batch".

I am very fond of this patch.  Still, the fact remains that until this
command is implemented by some other fast-import backend, it is hard
to know what git-specific concepts are encoded in its current
implementation.  (I am in particular worried about what should be
gauranteed about the blob_identifier in the

	blob blob_identifier 1823

line and whether

	cat-blob blob_name
	cat-blob :11

are going to overlap and cause trouble for some backends.)

On the other hand, development of svn-fe continues to benefit from
cat-blob and its cousins ls-tree and ls[1].  and there has been brief
discussion of using cat-blob to make cvs2git more friendly.  So here's
a reroll, since it seems clear that this feature should be in future
versions of fast-import in some form.

Thoughts welcome, as always (even as simple as "I have a bad feeling
about this" or "everything in this patch looks ready to go").

Patches based against v1.7.0.7 for no particular reason.

David Barr (1):
  fast-import: let importers retrieve blobs

Jonathan Nieder (3):
  fast-import: stricter parsing of integer options
  fast-import: clarify documentation of "feature" command
  fast-import: Allow cat-blob requests at arbitrary points in stream

 Documentation/git-fast-import.txt |   76 ++++++++---
 fast-import.c                     |  128 ++++++++++++++++--
 t/t9300-fast-import.sh            |  267 ++++++++++++++++++++++++++++++++++++-
 3 files changed, 442 insertions(+), 29 deletions(-)

[1] ls-tree commit_name "path/to/file" would have output format
100644 blob blob_identifier	path/to/file and within a commit
command, ls "path/to/file" would produce output in the same
format.