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

Re: repo.or.cz wishes?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 1, 2007, 02:58 UTC
Message-ID
<20070901025857.GD18160@spearce.org>
In-Reply-To
<alpine.LFD.0.999.0708291009570.25853@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 9 quoted lines
> On Wed, 29 Aug 2007, Shawn O. Pearce wrote:
> > 
> > Not if I already have a pointer from B to A's refs.  repo.or.cz
> > also has this same pointer:
> > 
> > 	git clone --shared A B
> > 	ln -s A/refs B/refs/forkee
> 
> Now, this doesn't work well with packed refs, I'm afraid.
No, it doesn't work well.  So I actually also avoid packing A's refs.
Which is yet another reason why my A's don't allow pushing, that
way nobody goes nuts and creates a ton of refs in there.  With only
refs/heads/master and it being unpacked its not a big deal.
 
> So I suspect that if we really want to support something like this, we'd 
> need to do more than just avoid the recursion when you cross-link.

Yes. I've been thinking about trying to better share the ODB and the ref database between repositories, but it has been low priority for me.

I rely on this ref symlinking/alternate ODB trick a lot at day-job to help me cope with an ugly situation I created across a number of repositories. Most of our codebase came from one Git repository, but has been refactored and split into about 10 different Git repositories. I did that refactoring by just cloning and deleting the uninteresting content, so each repository actually has a huge block of its history in common with the other 9.

One such A is "common-crap.git" that is the shared common history. Since its strictly history nobody changes that repository, and everyone borrows objects from it. This reduces my common working set by about 900MiB, as the history lives in only one packfile and not in 10.

There are obviously other ways to deal with this:
 - start the 10 repositories over again and use info/grafts to
   reinsert the old history when/if required;
 - just hardlink the same .keep'd packfile into the 10 repositories,
   since it is held by .keep it won't be touched during repack.

So one reason it has been low priority for me to improve upon is because there's more than one way to solve the problem, and the particular solution I have settled upon may not be the best solution for anyone.

Though I think we can all agree that repo.or.cz's use of forks is increasingly more popular, and one of the more powerful social features of git. Better supporting it out of the box by making it easier to setup and manage can only be a good thing for our users.

-- 
Shawn.
Previous: Linus Torvalds
Message 28 of 28 in “repo.or.cz wishes?”
  1. Petr BaudisAug 26, 2007
  2. Sven VerdoolaegeAug 27, 2007
  3. Petr BaudisAug 27, 2007
  4. Linus TorvaldsAug 27, 2007
  5. Junio C HamanoAug 27, 2007
  6. Matthieu MoyAug 27, 2007
  7. Martin MaresAug 27, 2007
  8. Jing XueAug 27, 2007
  9. Linus TorvaldsAug 27, 2007
  10. Sam VilainAug 27, 2007
  11. Linus TorvaldsAug 27, 2007
  12. Jakub NarebskiAug 27, 2007
  13. Linus TorvaldsAug 27, 2007
  14. Sam VilainAug 27, 2007
  15. Linus TorvaldsAug 27, 2007
  16. Jakub NarebskiAug 27, 2007
  17. Jakub NarebskiAug 27, 2007
  18. Sam VilainAug 27, 2007
  19. Johannes SchindelinAug 27, 2007
  20. Uwe Kleine-KönigAug 27, 2007
  21. Sven VerdoolaegeAug 29, 2007
  22. Jakub NarebskiAug 29, 2007
  23. Petr BaudisAug 29, 2007
  24. Petr BaudisAug 29, 2007
  25. Theodore TsoAug 29, 2007
  26. Shawn O. PearceAug 31, 2007
  27. Linus TorvaldsAug 29, 2007
  28. Shawn O. PearceSep 1, 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.