From: Alex Riesen Date: Wed, 01 Aug 2007 13:20:11 GMT Subject: Re: Git benchmark - comparison with Bazaar, Darcs, Git and Mercurial Message-ID: <81b0412b0708010620h6bf44aarb35da301db967855@mail.gmail.com> In-Reply-To: <7vr6mn5znm.fsf@assigned-by-dhcp.cox.net> On 8/1/07, Junio C Hamano wrote: > Theodore Tso writes: > > 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. ...as long as the underlying filesystem _supports_ hardlinks. BTW, we need a warning when falling back to normal copy, if git-clone -l is used. The user _asked_ for a hard-linked clone, but silently got something else. Something like this: diff --git a/git-clone.sh b/git-clone.sh index 0922554..a744f5b 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -266,6 +266,7 @@ yes,yes) l= if ln "$repo/$sample_file" "$GIT_DIR/objects/sample" 2>/dev/null then + echo >&2 "Hardlinks not supported. Falling back to copy" l=l fi && rm -f "$GIT_DIR/objects/sample" &&