Re: checkout without touching HEAD

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: checkout without touching HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:01

"Martin Langhoff" [off-list ref] 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

Re: checkout without touching HEAD

From: Martin Langhoff <hidden>
Date: 2016-06-15 22:44:01

On Dec 28, 2007 11:38 AM, Junio C Hamano [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help