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

Re: [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found)

From
Jeff King <peff@peff.net>
Date
Oct 31, 2007, 20:22 UTC
Message-ID
<20071031202220.GA13300@coredump.intra.peff.net>
In-Reply-To
<20071031201425.GA29332@gateway.home>
On Wed, Oct 31, 2007 at 09:14:25PM +0100, Erik Mouw wrote:
> > Patch, please?
> 
> Here you go.
Good, now we have something to critique. :)
> -		find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
> +		cp -Rp$l objects/ "$GIT_DIR/" || exit 1

cp -l isn't even close to portable. It's not in POSIX, and doesn't work on (at least) Solaris.

I think Mike's patch (cpio if available, copy otherwise) is a reasonable approach. If there are other methods (and I think cp -l is not unreasonable for systems where it is supported and cpio is unavailable), then perhaps it is worth trying them one by one and dropping back to full copy if all fail.

-Peff
Previous: Erik MouwNext: Mike Hommey
Message 9 of 10 in “cpio command not found”
  1. Bill LearOct 31, 2007
  2. Karl HasselströmOct 31, 2007
  3. Bill LearOct 31, 2007
  4. Allan WindOct 31, 2007
  5. David SymondsOct 31, 2007
  6. Erik MouwOct 31, 2007
  7. Johannes SchindelinOct 31, 2007
  8. Get rid of cpio in git-clone (was: Re: cpio command not found)Erik Mouw, Oct 31, 2007
  9. Jeff KingOct 31, 2007
  10. Mike HommeyOct 31, 2007

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.