X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-clone.sh;h=4fdd6525148d50bd3a014bfc0f60eefd0f16efb9;hb=5ca15b8af7f018b9ae9da30130f9dcd1a896e0b3;hp=c27a913b1ddf1474df4300dc68bebeeb06f145f1;hpb=e125c1a717bb732319596d8b792a67c2b7b15ef7;p=git.git diff --git a/git-clone.sh b/git-clone.sh index c27a913b..4fdd6525 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -126,8 +126,7 @@ yes,yes) 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 ;; yes) mkdir -p "$D/.git/objects/info" @@ -203,8 +202,16 @@ then mkdir -p .git/remotes && echo >.git/remotes/origin \ "URL: $repo -Pull: $head_points_at:origin" - cp ".git/refs/heads/$head_points_at" .git/refs/heads/origin +Pull: $head_points_at:origin" && + cp ".git/refs/heads/$head_points_at" .git/refs/heads/origin && + find .git/refs/heads -type f -print | + while read ref + do + head=`expr "$ref" : '.git/refs/heads/\(.*\)'` && + test "$head_points_at" = "$head" || + test "origin" = "$head" || + echo "Pull: ${head}:${head}" + done >>.git/remotes/origin esac case "$no_checkout" in