Junio C Hamano <[EMAIL PROTECTED]> writes:
> The only user of "cp -l" in the Linus GIT is git-clone-script
> local optimization. I could revert it to the version that I
> originally sent to the list, which uses cpio -pld, if your cpio
> groks that flag.
Bryan, does this work for you?
------------
Two changes to git-clone-script local optimization.
- When local optimization is used, the variable repo has
already been passed through get_repo_base so there is no need
to check for .git subdirectory in there.
- Use cpio -l instead of "cp -l".
Signed-off-by: Junio C Hamano <[EMAIL PROTECTED]>
---
diff --git a/git-clone-script b/git-clone-script
--- a/git-clone-script
+++ b/git-clone-script
@@ -48,11 +48,8 @@ test -d "$D" || usage
case "$local,$use_local" in
yes,yes)
( cd "$repo/objects" ) || {
- repo="$repo/.git"
- ( cd "$repo/objects" ) || {
- echo >&2 "-l flag seen but $repo is not local."
- exit 1
- }
+ echo >&2 "-l flag seen but $repo is not local."
+ exit 1
}
# See if we can hardlink and drop "l" if not.
@@ -68,7 +65,9 @@ yes,yes)
l=l
fi &&
rm -f "$D/.git/objects/sample" &&
- cp -r$l "$repo/objects" "$D/.git/" || exit 1
+ cd "$repo" &&
+ find objects -type f -print |
+ cpio -puamd$l "$D/.git/" || exit 1
# Make a duplicate of refs and HEAD pointer
HEAD=
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html