@matheusbsbs / matheus-bagliano / commits / 3d95bf074e
Fork 0

git-clone: fix local clone

If we let cpio to create the leading directories implicitly, it ends up having funny perm bits (GNU cpio 2.5 and 2.6, at least). This leaves .git/object/?? directories readable only by the owner. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Nov 5, 2005 at 11:44 UTC 3d95bf074e8532fd0643b886422eddd0768a3f2c
1 file changed +1 -2
git-clone.sh
+1 -2
@@ -126,8 +126,7 @@ yes,yes)
126 fi &&
127 rm -f "$D/.git/objects/sample" &&
128 cd "$repo" &&
129 - find objects -type f -print |
130 - cpio -puamd$l "$D/.git/" || exit 1
129 + find objects -depth -print | cpio -puamd$l "$D/.git/" || exit 1
130 ;;
131 yes)
132 mkdir -p "$D/.git/objects/info"