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

Re: [PATCH 5/9] git-cat-file: Add --separator option

From
Adam Roben <aroben@apple.com>
Date
Oct 24, 2007, 04:26 UTC
Message-ID
<471EC95D.6050201@apple.com>
In-Reply-To
<20071024034301.GE24924@lavos.net>
Brian Downing wrote:
Show 17 quoted lines
> On Mon, Oct 22, 2007 at 10:46:33PM -0700, Adam Roben wrote:
>   
>> +--separator::
>> +	A string to print in between the output for each object passed on
>> +	stdin. A newline will be appended to the separator each time it is
>> +	printed.
>>     
>
> Maybe I'm just unreasonably paranoid, but I don't think I could ever
> trust that you'd never find an arbitrary separator in the data.  I
> suppose if you scanned the files beforehand you could come up with
> something guaranteed to be unique, but that seems like a pain (and
> doesn't happen regardless in patch 9/9; it just uses
> "--------------GITCATFILESEPARATOR-----------")  If I were committing to
> SVN, it's sure not something I'd like to bet the integrity of my data
> on.
>   
I had some of the same concerns.
Show 9 quoted lines
> I think a far more reasonable output format for multiple objects would
> be something like:
>
> <count> LF
> <raw data> LF
>
> Where <count> is the number of bytes in the <raw data> as an ASCII
> decimal integer.
>   

This sounds like a much better solution. I'll implement it that way and send out a new patch. Thanks for the suggestion!

-Adam
Previous: Brian DowningNext: Johannes Sixt
Message 20 of 24 in “Make git-svn fetch ~1.7x faster”
  1. 0/9 Make git-svn fetch ~1.7x fasterAdam Roben, Oct 23, 2007
  2. 1/9 Add tests for git cat-fileAdam Roben, Oct 23, 2007
  3. 2/9 git-cat-file: Small refactor of cmd_cat_fileAdam Roben, Oct 23, 2007
  4. 3/9 git-cat-file: Make option parsing a little more flexibleAdam Roben, Oct 23, 2007
  5. 4/9 git-cat-file: Add --stdin optionAdam Roben, Oct 23, 2007
  6. 5/9 git-cat-file: Add --separator optionAdam Roben, Oct 23, 2007
  7. 6/9 Add tests for git hash-objectAdam Roben, Oct 23, 2007
  8. 7/9 git-hash-object: Add --stdin-paths optionAdam Roben, Oct 23, 2007
  9. 8/9 Git.pm: Add command_bidi_pipe and command_close_bidi_pipeAdam Roben, Oct 23, 2007
  10. 9/9 git-svn: Make fetch ~1.7x fasterAdam Roben, Oct 23, 2007
  11. Johannes SixtOct 23, 2007
  12. Eric WongOct 24, 2007
  13. Adam RobenOct 24, 2007
  14. Shawn O. PearceOct 23, 2007
  15. Adam RobenOct 23, 2007
  16. Shawn O. PearceOct 23, 2007
  17. Eric WongOct 24, 2007
  18. Johannes SixtOct 23, 2007
  19. Brian DowningOct 24, 2007
  20. Adam RobenOct 24, 2007
  21. Johannes SixtOct 23, 2007
  22. Mike HommeyOct 23, 2007
  23. Adam RobenOct 23, 2007
  24. Sam VilainOct 24, 2007

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.