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

Re: gitpacker progress report and a question

From
Eric S. Raymond <esr@thyrsus.com>
Date
Nov 26, 2012, 22:01 UTC
Message-ID
<20121126220108.GB1713@thyrsus.com>
In-Reply-To
<CAMP44s30px2FgieC9VcGji7T+yWFo7gMSwQhtuztHrqto8B7Aw@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com>:
> 1) I tried it, and it doesn't seem to import (pack?) are repository
> with sub-directories in it
I'll make sure my regression test checks this case.  The options to git 
ls-files are a bit confusing and it's possible my invocation of it
needs to change.
 
> 2) Using 'git fast-import' is probably simpler, and more efficient
That might well be.  I'm not worried about "efficiency" in this context 
but reducing the code size is significant and I'm willing to re-code
to do that.
 
> Here is a proof of concept I wrote in ruby that is half the size, and
> seems to implement the same functionality.

Not anywhere near the same. It only handles commits, not tags. It doesn't issue delete ops. And it doesn't rebuild branch heads. If I were willing to omit those features, I'm sure I could halve the size of my implementation, too. Of course, it would then be almost completely useless...

>                           The format is exactly the
> same, but I think it should be modified to be more efficient.

I'm not wedded to the log format as it is, so I'll cheerfully take suggestions about it.

Be aware, however, that I consider easy editability by human beings much more important than squeezing the last microsecond out of the processing time. So, for example, I won't use data byte counts rather than end delimiters, the way import streams do.

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Previous: Felipe ContrerasNext: Felipe Contreras
Message 6 of 16 in “gitpacker progress report and a question”
  1. Eric S. RaymondNov 15, 2012
  2. Max HornNov 15, 2012
  3. Eric S. RaymondNov 15, 2012
  4. Andreas SchwabNov 16, 2012
  5. Felipe ContrerasNov 26, 2012
  6. Eric S. RaymondNov 26, 2012
  7. Felipe ContrerasNov 26, 2012
  8. Eric S. RaymondNov 26, 2012
  9. Felipe ContrerasNov 27, 2012
  10. Felipe ContrerasNov 27, 2012
  11. Felipe ContrerasNov 27, 2012
  12. Eric S. RaymondNov 27, 2012
  13. Felipe ContrerasNov 27, 2012
  14. Eric S. RaymondNov 27, 2012
  15. Felipe ContrerasNov 27, 2012
  16. Eric S. RaymondNov 27, 2012

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.