Skip to content

fast-import: Let importers retrieve blobs

Jonathan Nieder git 1 version In review

Get series with b4
b4 am 20101128194131.GA19998@burratino

Versions newest first

  1. v3 Latest4 patches 7 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fast-import: stricter parsing of integer optionsfast-import.c t/t9300-fast-import.sh+19 -21 reply
2/4fast-import: clarify documentation of "feature" commandDocumentation/git-fast-import.txt+15 -180 replies
3/4fast-import: let importers retrieve blobsDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+327 -20 replies
3/4fast-import: let importers retrieve blobsDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+327 -210 replies
4/4fast-import: Allow cat-blob requests at arbitrary points in streamDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+86 -120 replies
4/4fast-import: Allow cat-blob requests at arbitrary points in streamDocumentation/git-fast-import.txt fast-import.c t/t9300-fast-import.sh+86 -120 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchJonathan NiederRamkumar RamachandraSverre Rabbelier
1/4Requested-by
2/4A-b
3/4Based-on-patch-by Based-on-patch-by A-b A-b A-b
3/4Based-on-patch-by Based-on-patch-by A-b A-b A-b
4/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

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

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

Quoted 5 lines · David Barr

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.