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

Re: Git benchmark - comparison with Bazaar, Darcs, Git and Mercurial

From
Theodore Tso <tytso@mit.edu>
Date
Aug 1, 2007, 22:03 UTC
Message-ID
<20070801220350.GD28106@thunk.org>
In-Reply-To
<7vr6mn5znm.fsf@assigned-by-dhcp.cox.net>
On Wed, Aug 01, 2007 at 03:15:25AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> > So would you accept a patch which adds a git-config variable which
> > specifies whether or not local clones should use hard links by default
> > (defaulting to yes), and which adds a --no-hard-links option to
> > git-clone to override the config option?
> 
> Are you suggesting to make -l the default for local, in other
> words?  I personally do not make local clone often enough that I
> am not disturbed having to type extra " -l" on the command line.

Yeah, essentially, with a git-config option (and comand-line option) to override the default for those people who are "squeamish" about git clone -l. Linus's suggestion of using file:// as a way to indicate non-local also makes a lot of sense to me.

> Perhaps if the destination is local,
> 
>          - if -s is given, just set up alternates, do nothing else;

As I understand it, the main objection with making -s the default is surprising result that could happen if you do a git-prune in the base repository which causes objects which are borrowed from the base repository via .git/objects/info/alternates, right?

What if git clone -s appended the repository which is borrowing objects via alternates to a file located in the base repository, .git/objects/info/shared-repos?

Then git-prune could also use the refs marked in each of the downstream repositories that are sharing objects with base repository and not make those objects go away. That way, git-gc --prune won't do anything surprising to any shared repositories, since it will scan those shared repositories automatically. Would that be considered acceptable? That way you can get instant clones even on filesystems that don't support hard links, such as Windows systems.

The way I would suggest doing it is once we implement support for .git/objects/info/shared-repos is to do the following with git-clone by default:

   	* If the source repo is specified via a file:// URL, per Linus's
          suggestion, do the clone via copying.
	* If the source repo is specified via a local pathname, and
          .git/objects/info/shared-repos in the source repository is
          writeable by the user who is doing the clone, then do a
          clone -s.
	* If the above fails, try clone -l
	* If the above fails, do a clone via copying over a new pack

Would this be acceptable? Patches to do the following should be fairly easy to whip up. Obviously this wouldn't be for 1.5.3. :-)

       	       	    	 	   	- Ted
Previous: Johan HerlandNext: Brandon Casey
Message 19 of 29 in “Git benchmark - comparison with Bazaar, Darcs, Git and Mercurial”
  1. Jakub NarebskiAug 1, 2007
  2. Linus TorvaldsAug 1, 2007
  3. Junio C HamanoAug 1, 2007
  4. David KastrupAug 1, 2007
  5. Theodore TsoAug 1, 2007
  6. Junio C HamanoAug 1, 2007
  7. Alex RiesenAug 1, 2007
  8. Alex RiesenAug 1, 2007
  9. Alex RiesenAug 1, 2007
  10. Carl WorthAug 1, 2007
  11. Linus TorvaldsAug 1, 2007
  12. David KastrupAug 1, 2007
  13. Florian WeimerAug 1, 2007
  14. Junio C HamanoAug 2, 2007
  15. David KastrupAug 2, 2007
  16. Junio C HamanoAug 3, 2007
  17. David KastrupAug 3, 2007
  18. Johan HerlandAug 3, 2007
  19. Theodore TsoAug 1, 2007
  20. Brandon CaseyAug 1, 2007
  21. Allan WindAug 2, 2007
  22. Linus TorvaldsAug 2, 2007
  23. Jakub NarebskiAug 1, 2007
  24. Jakub NarebskiAug 2, 2007
  25. Ramsay JonesAug 2, 2007
  26. Jakub NarebskiAug 1, 2007
  27. Junio C HamanoAug 1, 2007
  28. Jakub NarebskiAug 1, 2007
  29. Shawn O. PearceAug 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.