From: Konstantin Khomoutov <kostix+git@007spb.ru>
To: Robert Clausecker <fuzxxl@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Feature request: Allow extracting revisions into directories
Date: Mon, 4 Feb 2013 03:26:51 +0400 [thread overview]
Message-ID: <20130203232651.GV5210@localhost.localdomain> (raw)
In-Reply-To: <1359901085.24730.11.camel@t520>
On Sun, Feb 03, 2013 at 03:18:05PM +0100, Robert Clausecker wrote:
> git currently has the archive command that allows to save an arbitrary
> revision into a tar or zip file. Sometimes it is useful to not save this
> revision into an archive but to directly put all files into an arbitrary
> directory. Currently this seems to be not possible to archive directly;
> the only way I found to do it is to run git archive and then directly
> unpack the archive into a directory.
>
> git --git-dir REPO archive REVISION | tar x
>
> It would be nice to have a command or simply a switch to git archive
> that allows the user to put the files of REVISION into a directory
> instead of making an archive.
You could use plumbing commands combined with a throwaway custom index
file and a separate work tree which will receive the tree at REVISION:
export GIT_WORK_TREE=/path/to/dest/directory
export GIT_DIR=/path/to/repo/.git
export GIT_INDEX_FILE="$GIT_WORK_TREE/.index"
git read-tree REVISION
git checkout-index -a
rm -f "$GIT_INDEX_FILE"
next prev parent reply other threads:[~2013-02-03 23:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 14:18 Feature request: Allow extracting revisions into directories Robert Clausecker
2013-02-03 16:25 ` Sitaram Chamarty
2013-02-03 18:11 ` Robert Clausecker
2013-02-04 0:42 ` Sitaram Chamarty
2013-02-05 15:11 ` Phil Hord
2013-02-09 15:58 ` Robert Clausecker
2013-02-09 23:00 ` Junio C Hamano
2013-02-10 3:45 ` Junio C Hamano
2013-02-10 3:57 ` Robert Clausecker
2013-02-10 4:06 ` Jonathan Nieder
2013-02-10 4:10 ` Robert Clausecker
2013-02-10 4:19 ` Jonathan Nieder
2013-02-03 23:26 ` Konstantin Khomoutov [this message]
2013-02-04 11:18 ` Michael J Gruber
2013-02-04 12:14 ` Robert Clausecker
2013-02-04 12:47 ` Tomas Carnecky
2013-02-04 16:52 ` Junio C Hamano
2013-02-05 8:55 ` Sitaram Chamarty
2013-02-04 12:58 ` Andrew Ardill
2013-02-04 16:55 ` Junio C Hamano
2013-02-04 18:21 ` Andreas Schwab
2013-02-10 12:16 ` Thomas Koch
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=20130203232651.GV5210@localhost.localdomain \
--to=kostix+git@007spb.ru \
--cc=fuzxxl@gmail.com \
--cc=git@vger.kernel.org \
/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).