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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Erik Mouw
Date: Wednesday, October 31, 2007 - 1:14 pm

On Wed, Oct 31, 2007 at 02:20:47PM +0000, Johannes Schindelin wrote:
=20
=20

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.
=20
-	- "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.
=20
  - 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
 	;;



--=20
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
cpio command not found, Bill Lear, (Wed Oct 31, 5:51 am)
Re: cpio command not found, Karl , (Wed Oct 31, 6:30 am)
Re: cpio command not found, Bill Lear, (Wed Oct 31, 6:54 am)
Re: cpio command not found, Allan Wind, (Wed Oct 31, 6:58 am)
Re: cpio command not found, David Symonds, (Wed Oct 31, 7:00 am)
Re: cpio command not found, Erik Mouw, (Wed Oct 31, 7:06 am)
Re: cpio command not found, Johannes Schindelin, (Wed Oct 31, 7:20 am)
Re: cpio command not found, Mike Hommey, (Wed Oct 31, 12:48 pm)
[PATCH] Get rid of cpio in git-clone (was: Re: cpio comman ..., Erik Mouw, (Wed Oct 31, 1:14 pm)