On Thu, Oct 30, 2008 at 6:55 AM, Stefan Karpinski
[off-list ref] wrote:
On Wed, Oct 29, 2008 at 8:48 PM, Sam Vilain [off-list ref] wrote:
quoted
+ * 'git export' command that does what
+ 'git archive --format=tar --prefix=dir | tar x' does now
It would be nice if the "git export" command could "checkout" a
non-repo copy of a remote repo at a specific version. This would be as
simple as calling archive on the remote size and then unarchiving it
locally. But would of course take care of all the plumbing.
I'm not sure whether the "git archive | tar" or the following is more efficient:
export GIT_INDEX_FILE="$(mktemp .git/export-index.XXXXXX)"
git read-tree -i "$1"
git checkout-index -f -a --prefix="$2/"
Cheers,
Kyle Moffett