git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/4] fast-import: let importers retrieve blobs

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 4, 2010, 02:35 UTC
Message-ID
<20101204023515.GA18735@burratino>
In-Reply-To
<20101128194501.GD19998@burratino>
Jonathan Nieder wrote:
Show 5 quoted lines
>                                                              The value
> for cat-blob-fd cannot be specified in the stream because that would
> be a layering violation: the decision of where to direct a stream has
> to be made when fast-import is started anyway, so we might as well
> make the stream format is independent of that detail.
Ungrammatical.  I think I meant:
 There is no POSIX facility to open a file descriptor from outside
 after a process has already started; therefore, the frontend has to
 prepare a file descriptor for writing blobs before executing
 git fast-import.  The --cat-blob-fd command line option indicates
 which file descriptor that is, defaulting to 1.
 It does not make sense to wait until the stream starts to specify
 which fd so it is not allowed, avoiding a potential layering
 violation.  Other fast-import backends might provide other ways to
 specify where the blob stream should be written.
Show 7 quoted lines
> +++ b/fast-import.c
> @@ -2824,6 +2910,8 @@ static int parse_one_feature(const char *feature, int from_stream)
>  		option_import_marks(feature + 13, from_stream);
>  	} else if (!prefixcmp(feature, "export-marks=")) {
>  		option_export_marks(feature + 13);
> +	} else if (!strcmp(feature, "cat-blob")) {
> +		; /* Don't die - this feature is supported */

Implies support for a "--cat-blob" command line option that checks for cat-blob support. Is this wanted?

(If so, it should be documented. If not, the condition should be "from_stream && !strcmp(...)".)

Show 9 quoted lines
> @@ -2918,6 +3006,11 @@ static void parse_argv(void)
>  		if (parse_one_feature(a + 2, 0))
>  			continue;
>  
> +		if (!prefixcmp(a + 2, "cat-blob-fd=")) {
> +			option_cat_blob_fd(a + 2 + strlen("cat-blob-fd="));
> +			continue;
> +		}
> +
Would be simpler and more explicit to put in parse_one_feature:
	} else if (!from_stream && !prefixcmp(feature, "cat-blob-fd=")) {

Sorry this is taking so long to get right. :-/ Jonathan

Previous: Thomas RastNext: Jonathan Nieder
Message 19 of 34 in “[PATCHv2] Add support for subversion dump format v3”
  1. David BarrOct 15, 2010
  2. 1/5 fast-import: Let importers retrieve blobsDavid Barr, Oct 15, 2010
  3. Ramkumar RamachandraOct 18, 2010
  4. Jonathan NiederOct 18, 2010
  5. Jonathan NiederOct 18, 2010
  6. 0/4 fast-import: Let importers retrieve blobsJonathan Nieder, Nov 28, 2010
  7. 1/4 fast-import: stricter parsing of integer optionsJonathan Nieder, Nov 28, 2010
  8. Junio C HamanoNov 30, 2010
  9. 2/4 fast-import: clarify documentation of "feature" commandJonathan Nieder, Nov 28, 2010
  10. 3/4 fast-import: let importers retrieve blobsJonathan Nieder, Nov 28, 2010
  11. fixup! fast-import: let importers retrieve blobsDavid Barr, Nov 29, 2010
  12. David BarrNov 30, 2010
  13. Jonathan NiederNov 30, 2010
  14. Thomas RastDec 3, 2010
  15. Jonathan NiederDec 3, 2010
  16. Junio C HamanoDec 3, 2010
  17. Jonathan NiederDec 3, 2010
  18. Thomas RastDec 4, 2010
  19. Jonathan NiederDec 4, 2010
  20. Documentation/fast-import: capitalize beginning of sentenceJonathan Nieder, Jan 16, 2011
  21. 4/4 fast-import: Allow cat-blob requests at arbitrary points in streamJonathan Nieder, Nov 28, 2010
  22. 2/5 vcs-svn: Extend svndump to parse version 3 formatDavid Barr, Oct 15, 2010
  23. 3/5 vcs-svn: Implement prop-delta handling.David Barr, Oct 15, 2010
  24. Ramkumar RamachandraOct 18, 2010
  25. 4/5 vcs-svn: Add outfile option to buffer_copy_bytes()David Barr, Oct 15, 2010
  26. Jonathan NiederOct 18, 2010
  27. 5/5 svn-fe: Use the cat-blob command to apply deltasDavid Barr, Oct 15, 2010
  28. Ramkumar RamachandraOct 18, 2010
  29. Jonathan NiederOct 18, 2010
  30. Ramkumar RamachandraOct 18, 2010
  31. Jonathan NiederOct 18, 2010
  32. 3/4 fast-import: let importers retrieve blobsJonathan Nieder, Nov 19, 2010
  33. 4/4 fast-import: Allow cat-blob requests at arbitrary points in streamJonathan Nieder, Nov 19, 2010
  34. Sverre RabbelierNov 19, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.