git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Bryan Larsen <bryanlarsen@yahoo.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	bryan.larsen@gmail.com, pasky@suse.cz, git@vger.kernel.org
Subject: Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update
Date: Mon, 11 Jul 2005 13:30:54 -0700	[thread overview]
Message-ID: <7vy88dqe4h.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7virzhrtfy.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 11 Jul 2005 13:14:41 -0700")

Junio C Hamano <junkio@cox.net> 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 <junkio@cox.net>
---
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=

  parent reply	other threads:[~2005-07-11 20:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 10:14 [PATCH 0/6] parameterize gnu tool names; add Portfile for OS X darwinports Bryan Larsen
2005-07-11 10:14 ` [PATCH 1/6] git-gnu-progs: parameterize git Bryan Larsen
2005-07-11 10:14 ` [PATCH 2/6] config-sh: find and verify utils Bryan Larsen
2005-07-11 10:15 ` [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update Bryan Larsen
2005-07-11 19:02   ` Junio C Hamano
2005-07-11 19:10     ` Linus Torvalds
2005-07-11 19:42       ` Bryan Larsen
2005-07-11 20:00         ` Linus Torvalds
2005-07-12  9:03           ` Matthias Urlichs
2005-07-11 20:14         ` Junio C Hamano
2005-07-11 20:22           ` Bryan Larsen
2005-07-11 20:30           ` Junio C Hamano [this message]
2005-07-11 21:28             ` Bryan Larsen
2005-07-11 21:59               ` Junio C Hamano
2005-07-11 19:21     ` Bryan Larsen
2005-07-11 10:15 ` [PATCH 4/6] cogito-gnu-progs: parameterize cogito Bryan Larsen
2005-07-11 10:15 ` [PATCH 5/6] cogito-gnu-progs-Makefile: cogito Makefile update Bryan Larsen
2005-07-11 10:15 ` [PATCH 6/6] darwinports-Portfile: Portfile for cogito Bryan Larsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vy88dqe4h.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=bryan.larsen@gmail.com \
    --cc=bryanlarsen@yahoo.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).