{"thread":{"id":"11409","subject":"checkout without touching HEAD","startedAt":"2007-12-27T22:22:41Z","lastAt":"2007-12-27T22:48:57Z","messageCount":3,"participants":["Martin Langhoff","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"64127","messageId":"46a038f90712271422o7a831c09s463735ec41356b59@mail.gmail.com","threadId":"11409","inReplyTo":null,"subject":"checkout without touching HEAD","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-12-27T22:22:41Z","receivedAt":"2007-12-27T22:22:41Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Is there a way to get a 'checkout' of a treeish _directly_ from git to\nan empty (or 'no conflicting paths'-guaranteed) directory, without\ntouching HEAD?\n\nUsing `git-archive ... | tar -x` is a waste of time and resources -- I\ndo want this to be fast for large datasets. I have hacked it a bit by\nbacking up HEAD, using git checkout with a temporary index, and then\nrestoring HEAD, which I can do because my script has a big fat lock\naround it. But it's very un-gittish to need a big lock around me.\n\nMaybe there's a command I'm missing? Or a zikrit option to checkout I\nhaven't found?\n\ncheers,\n\n\nm\n"},{"id":"64128","messageId":"7vsl1nix0x.fsf@gitster.siamese.dyndns.org","threadId":"11409","inReplyTo":"46a038f90712271422o7a831c09s463735ec41356b59@mail.gmail.com","subject":"Re: checkout without touching HEAD","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-27T22:38:06Z","receivedAt":"2007-12-27T22:38:06Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Martin Langhoff\" <martin.langhoff@gmail.com> writes:\n\n> Is there a way to get a 'checkout' of a treeish _directly_ from git to\n> an empty (or 'no conflicting paths'-guaranteed) directory, without\n> touching HEAD?\n>\n> Using `git-archive ... | tar -x` is a waste of time and resources -- I\n> do want this to be fast for large datasets. I have hacked it a bit by\n> backing up HEAD, using git checkout with a temporary index, and then\n> restoring HEAD, which I can do because my script has a big fat lock\n> around it. But it's very un-gittish to need a big lock around me.\n\ngit read-tree -m -u HEAD $treeish\n"},{"id":"64130","messageId":"46a038f90712271448p7f069f06pcd52bf90941b71eb@mail.gmail.com","threadId":"11409","inReplyTo":"7vsl1nix0x.fsf@gitster.siamese.dyndns.org","subject":"Re: checkout without touching HEAD","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2007-12-27T22:48:57Z","receivedAt":"2007-12-27T22:48:57Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Dec 28, 2007 11:38 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> git read-tree -m -u HEAD $treeish\n\nThanks! Trying it now...\n\n(I'm combining git with PostgreSQL's PITR snapshot+xlog technique for\nan automated, reasonable-disk-footprint \"rewind my webapp to any\narbitrary point in time in the last X days\" facility, mainly for\nedit-heavy web apps like Moodle. So far, it's looking good ;-) --\ncould be a killer feature for the LAPP platform... )\n\n\n\nm\n"}]}