git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/6] git-gnu-progs-Makefile: git Makefile update

From
Junio C Hamano <junkio@cox.net>
Date
Jul 11, 2005, 20:30 UTC
Message-ID
<7vy88dqe4h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7virzhrtfy.fsf@assigned-by-dhcp.cox.net>
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=
Previous: Bryan LarsenNext: Bryan Larsen
Message 12 of 18 in “parameterize gnu tool names; add Portfile for OS X darwinports”
  1. 0/6 parameterize gnu tool names; add Portfile for OS X darwinportsBryan Larsen, Jul 11, 2005
  2. 1/6 git-gnu-progs: parameterize gitBryan Larsen, Jul 11, 2005
  3. 2/6 config-sh: find and verify utilsBryan Larsen, Jul 11, 2005
  4. 3/6 git-gnu-progs-Makefile: git Makefile updateBryan Larsen, Jul 11, 2005
  5. Junio C HamanoJul 11, 2005
  6. Linus TorvaldsJul 11, 2005
  7. Bryan LarsenJul 11, 2005
  8. Linus TorvaldsJul 11, 2005
  9. Matthias UrlichsJul 12, 2005
  10. Junio C HamanoJul 11, 2005
  11. Bryan LarsenJul 11, 2005
  12. Junio C HamanoJul 11, 2005
  13. Bryan LarsenJul 11, 2005
  14. Junio C HamanoJul 11, 2005
  15. Bryan LarsenJul 11, 2005
  16. 4/6 cogito-gnu-progs: parameterize cogitoBryan Larsen, Jul 11, 2005
  17. 5/6 cogito-gnu-progs-Makefile: cogito Makefile updateBryan Larsen, Jul 11, 2005
  18. 6/6 darwinports-Portfile: Portfile for cogitoBryan Larsen, Jul 11, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.