From: Erik Mouw <mouw@nl.linux.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Karl Hasselstr?m <kha@treskal.com>, Bill Lear <rael@zopyra.com>,
git@vger.kernel.org
Subject: [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found)
Date: Wed, 31 Oct 2007 21:14:25 +0100 [thread overview]
Message-ID: <20071031201425.GA29332@gateway.home> (raw)
In-Reply-To: <Pine.LNX.4.64.0710311420330.4362@racer.site>
[-- 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 --]
next prev parent reply other threads:[~2007-10-31 20:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Erik Mouw [this message]
2007-10-31 20:22 ` [PATCH] Get rid of cpio in git-clone (was: Re: cpio command not found) Jeff King
2007-10-31 19:48 ` cpio command not found Mike Hommey
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=20071031201425.GA29332@gateway.home \
--to=mouw@nl.linux.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
--cc=rael@zopyra.com \
/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).