Re: Git benchmark - comparison with Bazaar, Darcs, Git and Mercurial
On 8/1/07, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 9 quoted lines
> On 8/1/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> > 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 &&
>
> Err, the other way around, of course.
>
diff --git a/git-clone.sh b/git-clone.sh
index 0922554..483b91d 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -264,8 +264,10 @@ yes,yes)
test -f "$repo/$sample_file" || exit
l=
- if ln "$repo/$sample_file" "$GIT_DIR/objects/sample" 2>/dev/null
+ if ! ln "$repo/$sample_file" "$GIT_DIR/objects/sample" 2>/dev/null
then
+ echo >&2 "Hardlinks not supported. Falling back to copy"
+ else
l=l
fi &&
rm -f "$GIT_DIR/objects/sample" &&