* checkout without touching HEAD
@ 2007-12-27 22:22 Martin Langhoff
2007-12-27 22:38 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Martin Langhoff @ 2007-12-27 22:22 UTC (permalink / raw)
To: Git Mailing List
Is there a way to get a 'checkout' of a treeish _directly_ from git to
an empty (or 'no conflicting paths'-guaranteed) directory, without
touching HEAD?
Using `git-archive ... | tar -x` is a waste of time and resources -- I
do want this to be fast for large datasets. I have hacked it a bit by
backing up HEAD, using git checkout with a temporary index, and then
restoring HEAD, which I can do because my script has a big fat lock
around it. But it's very un-gittish to need a big lock around me.
Maybe there's a command I'm missing? Or a zikrit option to checkout I
haven't found?
cheers,
m
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: checkout without touching HEAD
2007-12-27 22:22 checkout without touching HEAD Martin Langhoff
@ 2007-12-27 22:38 ` Junio C Hamano
2007-12-27 22:48 ` Martin Langhoff
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-12-27 22:38 UTC (permalink / raw)
To: Martin Langhoff; +Cc: Git Mailing List
"Martin Langhoff" <martin.langhoff@gmail.com> writes:
> Is there a way to get a 'checkout' of a treeish _directly_ from git to
> an empty (or 'no conflicting paths'-guaranteed) directory, without
> touching HEAD?
>
> Using `git-archive ... | tar -x` is a waste of time and resources -- I
> do want this to be fast for large datasets. I have hacked it a bit by
> backing up HEAD, using git checkout with a temporary index, and then
> restoring HEAD, which I can do because my script has a big fat lock
> around it. But it's very un-gittish to need a big lock around me.
git read-tree -m -u HEAD $treeish
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: checkout without touching HEAD
2007-12-27 22:38 ` Junio C Hamano
@ 2007-12-27 22:48 ` Martin Langhoff
0 siblings, 0 replies; 3+ messages in thread
From: Martin Langhoff @ 2007-12-27 22:48 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
On Dec 28, 2007 11:38 AM, Junio C Hamano <gitster@pobox.com> wrote:
> git read-tree -m -u HEAD $treeish
Thanks! Trying it now...
(I'm combining git with PostgreSQL's PITR snapshot+xlog technique for
an automated, reasonable-disk-footprint "rewind my webapp to any
arbitrary point in time in the last X days" facility, mainly for
edit-heavy web apps like Moodle. So far, it's looking good ;-) --
could be a killer feature for the LAPP platform... )
m
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-27 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27 22:22 checkout without touching HEAD Martin Langhoff
2007-12-27 22:38 ` Junio C Hamano
2007-12-27 22:48 ` Martin Langhoff
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).