{"thread":{"id":"16931","subject":"Extracting a single commit or object","startedAt":"2008-12-30T22:15:57Z","lastAt":"2009-01-02T17:37:11Z","messageCount":6,"participants":["yitzhakbg","Shawn O. Pearce","Johannes Schindelin","Miklos Vajna","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"99001","messageId":"21223948.post@talk.nabble.com","threadId":"16931","inReplyTo":null,"subject":"Extracting a single commit or object","fromName":"yitzhakbg","fromEmail":"yitzhakbg@gmail.com","sentAt":"2008-12-30T22:15:57Z","receivedAt":"2008-12-30T22:15:57Z","isPatch":false,"sender":{"key":"yitzhakbg@gmail.com","avatar":null},"body":"\nHow would I extract a single commit from a repository by it's SHA1 (or any\nother treeish)?\nFor that matter, how is any one single object extracted? Examples please.\nThanks,\nYBG\n-- \nView this message in context: http://www.nabble.com/Extracting-a-single-commit-or-object-tp21223948p21223948.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"99003","messageId":"20081230222106.GE29071@spearce.org","threadId":"16931","inReplyTo":"21223948.post@talk.nabble.com","subject":"Re: Extracting a single commit or object","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-12-30T22:21:06Z","receivedAt":"2008-12-30T22:21:06Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"yitzhakbg <yitzhakbg@gmail.com> wrote:\n> \n> How would I extract a single commit from a repository by it's SHA1 (or any\n> other treeish)?\n> For that matter, how is any one single object extracted? Examples please.\n\ngit cat-file $type $sha1\n\ne.g.\n\ngit cat-file commit $commitsha1\ngit cat-file blob $blobsha1\n\nIf you need to inspect a tree, ls-tree is probably better:\n\ngit ls-tree $commitsha1\ngit ls-tree $treesha1\n\n-- \nShawn.\n"},{"id":"99088","messageId":"alpine.DEB.1.00.0901011747580.30769@pacific.mpi-cbg.de","threadId":"16931","inReplyTo":"21223948.post@talk.nabble.com","subject":"Re: Extracting a single commit or object","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-01T16:52:49Z","receivedAt":"2009-01-01T16:52:49Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 30 Dec 2008, yitzhakbg wrote:\n\n> How would I extract a single commit from a repository by it's SHA1 (or \n> any other treeish)?\n\nYour question is not precise enough to answer.  Are you looking for\n\n- the commit message?\n- the patch?\n- all the files referenced by that commit?\n- all the files _and revisions_ referenced by that commit?\n\nThe answer depends quite a lot on the question...\n\n> For that matter, how is any one single object extracted? Examples please.\n\nThe user-friendly way to look at a tree is\n\n\tgit show HEAD:Documentation/\n\nor some such.  Likewise, you can inspect single blobs like this:\n\n\tgit show HEAD:README\n\nIf you activated bash completion, you can even complete monsters like \nthis:\n\n\tgit show \\\nv1.5.3:v1.5.3:t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n\nHth,\nDscho\n"},{"id":"99092","messageId":"20090101180834.GJ21154@genesis.frugalware.org","threadId":"16931","inReplyTo":"alpine.DEB.1.00.0901011747580.30769@pacific.mpi-cbg.de","subject":"Re: Extracting a single commit or object","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2009-01-01T18:08:34Z","receivedAt":"2009-01-01T18:08:34Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Thu, Jan 01, 2009 at 05:52:49PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> If you activated bash completion, you can even complete monsters like \n> this:\n> \n> \tgit show \\\n> v1.5.3:v1.5.3:t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n\nWow, that's really a monster. After removing the first leading v1.5.3:,\nit works. (If this is a bash completion bug, I can't reproduce.)\n"},{"id":"99119","messageId":"81b0412b0901011406n13eb2fbarbed613785d9896f4@mail.gmail.com","threadId":"16931","inReplyTo":"20081230222106.GE29071@spearce.org","subject":"Re: Extracting a single commit or object","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-01-01T22:06:54Z","receivedAt":"2009-01-01T22:06:54Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2008/12/30 Shawn O. Pearce <spearce@spearce.org>:\n> yitzhakbg <yitzhakbg@gmail.com> wrote:\n>>\n>> How would I extract a single commit from a repository by it's SHA1 (or any\n>> other treeish)?\n>> For that matter, how is any one single object extracted? Examples please.\n>\n> git cat-file $type $sha1\n>\n\ngit cat-file -p $sha1\n"},{"id":"99174","messageId":"alpine.DEB.1.00.0901021836430.30769@pacific.mpi-cbg.de","threadId":"16931","inReplyTo":"20090101180834.GJ21154@genesis.frugalware.org","subject":"Re: Extracting a single commit or object","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-02T17:37:11Z","receivedAt":"2009-01-02T17:37:11Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 1 Jan 2009, Miklos Vajna wrote:\n\n> On Thu, Jan 01, 2009 at 05:52:49PM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > If you activated bash completion, you can even complete monsters like \n> > this:\n> > \n> > \tgit show \\\n> > v1.5.3:v1.5.3:t/t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\n> \n> Wow, that's really a monster. After removing the first leading v1.5.3:, \n> it works. (If this is a bash completion bug, I can't reproduce.)\n\nHeh, it's just another proof that copy-n-paste ist just error-prone.\n\nThanks,\nDscho\n"}]}