* cpio command not found @ 2007-10-31 12:51 Bill Lear 2007-10-31 13:30 ` Karl Hasselström 0 siblings, 1 reply; 10+ messages in thread From: Bill Lear @ 2007-10-31 12:51 UTC (permalink / raw) To: git I just cloned the latest git and it builds ok, but fails when I clone: % uname -a Linux gronk.zopyra.com 2.4.9-21 #1 Thu Jan 17 14:16:30 EST 2002 i686 unknown % git --version git version gitgui.0.8.4.g9c514 % git clone --bare ~/my_repo Initialized empty Git repository in /repos/git/my_repo/ /opt/git/bin/git-clone: line 297: cpio: command not found So, should git not check this when it is building? I don't remember this dependence from earlier versions of git. I have been running git 1.4.xx on this machine for a while... Bill ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 12:51 cpio command not found Bill Lear @ 2007-10-31 13:30 ` Karl Hasselström 2007-10-31 13:54 ` Bill Lear 2007-10-31 14:06 ` Erik Mouw 0 siblings, 2 replies; 10+ messages in thread From: Karl Hasselström @ 2007-10-31 13:30 UTC (permalink / raw) To: Bill Lear; +Cc: git On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > I don't remember this dependence from earlier versions of git. I > have been running git 1.4.xx on this machine for a while... When you clone with -l, git uses cpio to hardlink to the original repository. What has changed is that -l is now used by default when cloning a repository that's accessed via the file system (as opposed to over some network protocol). To work around this, specify the repository location with file://, and git won't try to hardlink (and hence won't try to use cpio). -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 13:30 ` Karl Hasselström @ 2007-10-31 13:54 ` Bill Lear 2007-10-31 13:58 ` Allan Wind 2007-10-31 14:00 ` David Symonds 2007-10-31 14:06 ` Erik Mouw 1 sibling, 2 replies; 10+ messages in thread From: Bill Lear @ 2007-10-31 13:54 UTC (permalink / raw) To: Karl Hasselström; +Cc: git On Wednesday, October 31, 2007 at 14:30:39 (+0100) Karl Hasselström writes: >On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > >> I don't remember this dependence from earlier versions of git. I >> have been running git 1.4.xx on this machine for a while... > >When you clone with -l, git uses cpio to hardlink to the original >repository. What has changed is that -l is now used by default when >cloning a repository that's accessed via the file system (as opposed >to over some network protocol). > >To work around this, specify the repository location with file://, and >git won't try to hardlink (and hence won't try to use cpio). Hmm, thanks for the workaround, but I don't altogether like leaving things like this. If the system does not have cpio, I think the build of git should complain and fail, or it should activate code that treats any repository accessed over the file system as it would file://. No sense in leaving this surprise to the user so late in the cycle. Bill ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 13:54 ` Bill Lear @ 2007-10-31 13:58 ` Allan Wind 2007-10-31 14:00 ` David Symonds 1 sibling, 0 replies; 10+ messages in thread From: Allan Wind @ 2007-10-31 13:58 UTC (permalink / raw) To: git On 2007-10-31T07:54:02-0600, Bill Lear wrote: > If the system does not have cpio, I think the build of git should > complain and fail, or it should activate code that treats any > repository accessed over the file system as it would file://. git may be build and run on two different hosts, so while the build-time check is good there should be a run-time check as well. /Allan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 13:54 ` Bill Lear 2007-10-31 13:58 ` Allan Wind @ 2007-10-31 14:00 ` David Symonds 1 sibling, 0 replies; 10+ messages in thread From: David Symonds @ 2007-10-31 14:00 UTC (permalink / raw) To: Bill Lear; +Cc: Karl Hasselström, git On 11/1/07, Bill Lear <rael@zopyra.com> wrote: > On Wednesday, October 31, 2007 at 14:30:39 (+0100) Karl Hasselström writes: > >On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > > > >> I don't remember this dependence from earlier versions of git. I > >> have been running git 1.4.xx on this machine for a while... > > > >When you clone with -l, git uses cpio to hardlink to the original > >repository. What has changed is that -l is now used by default when > >cloning a repository that's accessed via the file system (as opposed > >to over some network protocol). > > > >To work around this, specify the repository location with file://, and > >git won't try to hardlink (and hence won't try to use cpio). > > Hmm, thanks for the workaround, but I don't altogether like leaving > things like this. > > If the system does not have cpio, I think the build of git should > complain and fail, or it should activate code that treats any > repository accessed over the file system as it would file://. Something like this could be done at run-time instead. You might install cpio, but shouldn't require a rebuild of git just to use it. Dave. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 13:30 ` Karl Hasselström 2007-10-31 13:54 ` Bill Lear @ 2007-10-31 14:06 ` Erik Mouw 2007-10-31 14:20 ` Johannes Schindelin 2007-10-31 19:48 ` cpio command not found Mike Hommey 1 sibling, 2 replies; 10+ messages in thread From: Erik Mouw @ 2007-10-31 14:06 UTC (permalink / raw) To: Karl Hasselstr?m; +Cc: Bill Lear, git [-- Attachment #1: Type: text/plain, Size: 734 bytes --] On Wed, Oct 31, 2007 at 02:30:39PM +0100, Karl Hasselstr?m wrote: > On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > > > I don't remember this dependence from earlier versions of git. I > > have been running git 1.4.xx on this machine for a while... > > When you clone with -l, git uses cpio to hardlink to the original > repository. What has changed is that -l is now used by default when > cloning a repository that's accessed via the file system (as opposed > to over some network protocol). Why cpio? What is wrong with ln(1) (every Unix should have one) or link(2) ? Erik -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 14:06 ` Erik Mouw @ 2007-10-31 14:20 ` Johannes Schindelin 2007-10-31 20:14 ` [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) Erik Mouw 2007-10-31 19:48 ` cpio command not found Mike Hommey 1 sibling, 1 reply; 10+ messages in thread From: Johannes Schindelin @ 2007-10-31 14:20 UTC (permalink / raw) To: Erik Mouw; +Cc: Karl Hasselstr?m, Bill Lear, git Hi, On Wed, 31 Oct 2007, Erik Mouw wrote: > On Wed, Oct 31, 2007 at 02:30:39PM +0100, Karl Hasselstr?m wrote: > > On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > > > > > I don't remember this dependence from earlier versions of git. I > > > have been running git 1.4.xx on this machine for a while... > > > > When you clone with -l, git uses cpio to hardlink to the original > > repository. What has changed is that -l is now used by default when > > cloning a repository that's accessed via the file system (as opposed > > to over some network protocol). > > Why cpio? What is wrong with ln(1) (every Unix should have one) or > link(2) ? Patch, please? Ciao, Dscho ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) 2007-10-31 14:20 ` Johannes Schindelin @ 2007-10-31 20:14 ` Erik Mouw 2007-10-31 20:22 ` Jeff King 0 siblings, 1 reply; 10+ messages in thread From: Erik Mouw @ 2007-10-31 20:14 UTC (permalink / raw) To: Johannes Schindelin; +Cc: Karl Hasselstr?m, Bill Lear, git [-- Attachment #1: Type: text/plain, Size: 2046 bytes --] On Wed, Oct 31, 2007 at 02:20:47PM +0000, Johannes Schindelin wrote: > On Wed, 31 Oct 2007, Erik Mouw wrote: > > > On Wed, Oct 31, 2007 at 02:30:39PM +0100, Karl Hasselstr?m wrote: > > > On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > > > > > > > I don't remember this dependence from earlier versions of git. I > > > > have been running git 1.4.xx on this machine for a while... > > > > > > When you clone with -l, git uses cpio to hardlink to the original > > > repository. What has changed is that -l is now used by default when > > > cloning a repository that's accessed via the file system (as opposed > > > to over some network protocol). > > > > Why cpio? What is wrong with ln(1) (every Unix should have one) or > > link(2) ? > > Patch, please? Here you go. Remove dependency on cpio for git-clone. Apparently some POSIX systems out there don't have cpio, just assume cp is there. Signed-off-by: Erik Mouw <mouw@nl.linux.org> diff --git a/INSTALL b/INSTALL index f1eb404..9074563 100644 --- a/INSTALL +++ b/INSTALL @@ -79,8 +79,7 @@ Issues of note: - "perl" and POSIX-compliant shells are needed to use most of the barebone Porcelainish scripts. - - "cpio" is used by git-merge for saving and restoring the index, - and by git-clone when doing a local (possibly hardlinked) clone. + - "cpio" is used by git-merge for saving and restoring the index. - Some platform specific issues are dealt with Makefile rules, but depending on your specific installation, you may not diff --git a/git-clone.sh b/git-clone.sh index 0ea3c24..061534c 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -294,7 +294,7 @@ yes) fi fi && cd "$repo" && - find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1 + cp -Rp$l objects/ "$GIT_DIR/" || exit 1 fi git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1 ;; -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) 2007-10-31 20:14 ` [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) Erik Mouw @ 2007-10-31 20:22 ` Jeff King 0 siblings, 0 replies; 10+ messages in thread From: Jeff King @ 2007-10-31 20:22 UTC (permalink / raw) To: Erik Mouw; +Cc: Johannes Schindelin, Karl Hasselstr?m, Bill Lear, git 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: cpio command not found 2007-10-31 14:06 ` Erik Mouw 2007-10-31 14:20 ` Johannes Schindelin @ 2007-10-31 19:48 ` Mike Hommey 1 sibling, 0 replies; 10+ messages in thread From: Mike Hommey @ 2007-10-31 19:48 UTC (permalink / raw) To: Erik Mouw; +Cc: Karl Hasselstr?m, Bill Lear, git On Wed, Oct 31, 2007 at 03:06:55PM +0100, Erik Mouw wrote: > On Wed, Oct 31, 2007 at 02:30:39PM +0100, Karl Hasselstr?m wrote: > > On 2007-10-31 06:51:30 -0600, Bill Lear wrote: > > > > > I don't remember this dependence from earlier versions of git. I > > > have been running git 1.4.xx on this machine for a while... > > > > When you clone with -l, git uses cpio to hardlink to the original > > repository. What has changed is that -l is now used by default when > > cloning a repository that's accessed via the file system (as opposed > > to over some network protocol). > > Why cpio? What is wrong with ln(1) (every Unix should have one) or > link(2) ? Since git-clone is not yet a builtin, and is actually a shell script, it makes more sense to use cpio than ln. Mike ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-10-31 20:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-10-31 12:51 cpio command not found Bill Lear 2007-10-31 13:30 ` Karl Hasselström 2007-10-31 13:54 ` Bill Lear 2007-10-31 13:58 ` Allan Wind 2007-10-31 14:00 ` David Symonds 2007-10-31 14:06 ` Erik Mouw 2007-10-31 14:20 ` Johannes Schindelin 2007-10-31 20:14 ` [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) Erik Mouw 2007-10-31 20:22 ` Jeff King 2007-10-31 19:48 ` cpio command not found Mike Hommey
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).