Re: [PATCH] Documentation: add a planning document for the next CLI revamp
- From
- Kyle Moffett <kyle@moffetthome.net>
- Date
- Oct 31, 2008, 11:38 UTC
- Message-ID
- <f73f7ab80810310438k3282639eta90f2a0589a12c1@mail.gmail.com>
- In-Reply-To
- <d4bc1a2a0810300355q42b35a35p2ba0e778691a0ab6@mail.gmail.com>
On Thu, Oct 30, 2008 at 6:55 AM, Stefan Karpinski <stefan.karpinski@gmail.com> wrote:
Show 8 quoted lines
> On Wed, Oct 29, 2008 at 8:48 PM, Sam Vilain <sam@vilain.net> wrote: >> + * '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