1. Stefan Saasen
  2. git


Junio C Hamano  committed 3d95bf0

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>

  • Participants
  • Parent commits 32276c8
  • Branches master

Comments (0)

Files changed (1)

File git-clone.sh

View file
 	    fi &&
 	    rm -f "$D/.git/objects/sample" &&
 	    cd "$repo" &&
-	    find objects -type f -print |
-	    cpio -puamd$l "$D/.git/" || exit 1
+	    find objects -depth -print | cpio -puamd$l "$D/.git/" || exit 1
 	    mkdir -p "$D/.git/objects/info"