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

Re: [PATCH 7/9] git-hash-object: Add --stdin-paths option

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 24, 2007, 06:11 UTC
Message-ID
<20071024061123.GA10916@soma>
In-Reply-To
<20071023061022.GG14735@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
Show 32 quoted lines
> Adam Roben <aroben@apple.com> wrote:
> > Shawn O. Pearce wrote:
> > >Adam Roben <aroben@apple.com> wrote:
> > >  
> > >>This allows multiple paths to be specified on stdin.
> > >
> > >git-fast-import wasn't suited to the task?
> > 
> > I actually considered using fast-import for the whole shebang, but 
> > decided that I don't yet understand the workings and structure of 
> > git-svn well enough to make such a big change.
> > 
> > git-svn uses git-hash-object to both determine a file's hash and insert 
> > it into the index in one go -- can fast-import do this? Or will it just 
> > put it in the index and not give you the hash back? The latter was my 
> > impression.
> 
> It doesn't currently give you the hash back.  You can sort of get
> to it by marking the blob then using the 'checkpoint' command to
> dump the marks to a file, which you can read in.  Not good.
> 
> It probably wouldn't be very difficult to give fast-import a way
> to dump marks back on stdout as they are assigned.  So long as the
> frontend either locksteps with fast-import or is willing to monitor
> it with a select/poll type of arrangement and read from stdout as
> soon as its ready.
> 
> Probably a 5 line code change to fast-import.  Like this.  Only Git
> won't recognize that object SHA-1 as its in a packfile that has
> no index.  You'd need to 'checkpoint' to flush the object out, or
> just use all of fast-import for the processing.  So yea, I guess
> I can see now how its not suited to this.

Shawn, thanks for clearing that up. I was previously considering fast-import for git-svn, but never had time[1] to really look at it.

I guess Adam is on the right track with his patches.
[1] - Sorry to all on the list, but I've really been slacking on git-svn
      work.  I was going to get some stuff done this weekend but decided
      to attempt to fight my nasty caffeine addiction instead :x
-- 
Eric Wong
Previous: Shawn O. PearceNext: Johannes Sixt
Message 17 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.