{"thread":{"id":"6990","subject":"How do get a specific version of a particular file?","startedAt":"2007-02-27T12:34:31Z","lastAt":"2007-02-28T04:33:55Z","messageCount":32,"participants":["Theodore Ts'o","Peter Baumann","Christian MICHON","Alex Riesen","Johannes Schindelin","Linus Torvalds","Bill Lear","Theodore Tso","Randal L. Schwartz","Junio C Hamano","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"35599","messageId":"E1HM1XL-00071C-N5@candygram.thunk.org","threadId":"6990","inReplyTo":null,"subject":"How do get a specific version of a particular file?","fromName":"Theodore Ts'o","fromEmail":"tytso@mit.edu","sentAt":"2007-02-27T12:34:31Z","receivedAt":"2007-02-27T12:34:31Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"\nSo given a particular tree-ish and a pathname, I'd like get the contents\nof that particular file as of a particular revision.  i.e., the\nequivalent of:\n\n\tcvs -r v1.37 -p e2fsck/pass1.c\nor\n\tbk cat -r 2345 e2fsck/pass1.c\n\nThe closest I've been able to come is to use\n\n\tgit archive --format=zip v1.37 e2fsck/pass1.c | gunzip\n\nBut that seems kinda silly.  \n\ngit-checkout will only write the output to the working tree.\ngit-cat-file and git-show only work on a object identifier (they are\nlow-level plumbing commands).  \n\nSo if it is a matter of we don't have an easy way to do this (as opposed\nto me being stupid or the git documentation just failing to mention it\nin the right places), what's the best way to add it?\n\nOne easy way would be to add --format=raw to git-archive, but that might\nseem counter-intuitive to an average git user; they just want to see the\noutput of a file at a particular point in time, which doesn't have much\nto do with archiving.   \n\nShould we add a new command like \"git-cat\"?   Should we add a -p option\nto the \"git-checkout <treeish> <path>\" form of git-checkout?\n\nI'm currently leaning towards the last; it would be pretty simple to\nenhance git-checkout so that a -p option would run \"git archive\n--format=zip ...\", even though that would be a pretty nasty hack, and it\nwouldn't be much harder to add --format=raw support to git-archive, but\nI still think that's not a intuitive place to find that particular\nfunctionality.\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35602","messageId":"46d6db660702270443w22361619p8cfb624780ee5a57@mail.gmail.com","threadId":"6990","inReplyTo":"E1HM1XL-00071C-N5@candygram.thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Christian MICHON","fromEmail":"christian.michon@gmail.com","sentAt":"2007-02-27T12:43:53Z","receivedAt":"2007-02-27T12:43:53Z","isPatch":false,"sender":{"key":"christian.michon@gmail.com","avatar":"https://gravatar.com/avatar/8a7c327b21187fbcab5c27640a49450eec72e0355dc292501197f27a5a744ec4?d=mp&s=160"},"body":"quoting Linus:\n\nWell, you can just add\n\n       [alias]\n               cat=-p cat-file -p\n\nto your ~/.gitconfig file, and you're there.\n\n[ For all the non-git people here: the first \"-p\" is shorthand for\n \"--paginate\", and means that git will automatically start a pager for\n the output. The second \"-p\" is shorthand for \"pretty\" (there's no\n long-format command line switch for it, though), and means that git\n cat-file will show the result in a human-readable way, regardless of\n whether it's just a text-file, or a git directory ]\n\nSo then you can do just\n\n       git cat todo:TODO\n\nand you're done.\n\n[ So for the non-git people, what that will actually _do_ is to show the\n TODO file in the \"todo\" branch - regardless of whether it is checked out\n or not, and start a pager for you. ]\n\nI actually do this sometimes, but I've never done it for branches (and I\ndo it seldom enough that I haven't added the alias). I do it for things\nlike\n\n       git cat v2.6.16:Makefile\n\n-- \nChristian\n"},{"id":"35601","messageId":"slrneu89tr.24s.siprbaum@xp.machine.xx","threadId":"6990","inReplyTo":"E1HM1XL-00071C-N5@candygram.thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Peter Baumann","fromEmail":"siprbaum@stud.informatik.uni-erlangen.de","sentAt":"2007-02-27T12:44:43Z","receivedAt":"2007-02-27T12:44:43Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"Theodore Ts'o <tytso@mit.edu> schrieb:\n>\n> So given a particular tree-ish and a pathname, I'd like get the contents\n> of that particular file as of a particular revision.  i.e., the\n> equivalent of:\n>\n> \tcvs -r v1.37 -p e2fsck/pass1.c\n> or\n> \tbk cat -r 2345 e2fsck/pass1.c\n>\n> The closest I've been able to come is to use\n>\n> \tgit archive --format=zip v1.37 e2fsck/pass1.c | gunzip\n>\n> But that seems kinda silly.  \n>\n> git-checkout will only write the output to the working tree.\n> git-cat-file and git-show only work on a object identifier (they are\n> low-level plumbing commands).  \n>\n> So if it is a matter of we don't have an easy way to do this (as opposed\n> to me being stupid or the git documentation just failing to mention it\n> in the right places), what's the best way to add it?\n>\n> One easy way would be to add --format=raw to git-archive, but that might\n> seem counter-intuitive to an average git user; they just want to see the\n> output of a file at a particular point in time, which doesn't have much\n> to do with archiving.   \n>\n> Should we add a new command like \"git-cat\"?   Should we add a -p option\n> to the \"git-checkout <treeish> <path>\" form of git-checkout?\n>\n> I'm currently leaning towards the last; it would be pretty simple to\n> enhance git-checkout so that a -p option would run \"git archive\n> --format=zip ...\", even though that would be a pretty nasty hack, and it\n> wouldn't be much harder to add --format=raw support to git-archive, but\n> I still think that's not a intuitive place to find that particular\n> functionality.\n>\n> \t\t\t\t\t\t- Ted\n\nYou you could do this with\n\n\tgit show v1.5.0:Makefile\n\nto show you the Makefile in revision v1.5.0.\n\n-Peter\n"},{"id":"35605","messageId":"81b0412b0702270449r7aced195xa0a24af78d94243a@mail.gmail.com","threadId":"6990","inReplyTo":"E1HM1XL-00071C-N5@candygram.thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-02-27T12:49:42Z","receivedAt":"2007-02-27T12:49:42Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 2/27/07, Theodore Ts'o <tytso@mit.edu> wrote:\n>\n> So given a particular tree-ish and a pathname, I'd like get the contents\n> of that particular file as of a particular revision.  i.e., the\n> equivalent of:\n>\n>         cvs -r v1.37 -p e2fsck/pass1.c\n> or\n>         bk cat -r 2345 e2fsck/pass1.c\n>\n> The closest I've been able to come is to use\n>\n>         git archive --format=zip v1.37 e2fsck/pass1.c | gunzip\n>\n\ngit cat-file -p <objname>:file\n\nI.e.: git cat-file v1.37:e2fsck/pass1.c\n"},{"id":"35606","messageId":"81b0412b0702270453ib2398a7q4b348a8677f5ac1e@mail.gmail.com","threadId":"6990","inReplyTo":"81b0412b0702270449r7aced195xa0a24af78d94243a@mail.gmail.com","subject":"Re: How do get a specific version of a particular file?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-02-27T12:53:21Z","receivedAt":"2007-02-27T12:53:21Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 2/27/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n>\n> git cat-file -p <objname>:file\n>\n> I.e.: git cat-file v1.37:e2fsck/pass1.c\n>\n\nErr... With -p (for pretty).\n\n  git cat-file -p v1.37:e2fsck/pass1.c\n\nThis outputs just the file, not prettifying, actually.\n\nBtw, for broken OS (and not to be named broken workarounds\nfor the broken OS') we probably need \"-o <output-file>\".\nI forget what it was, but something used to mangle pipes on windows.\n"},{"id":"35607","messageId":"Pine.LNX.4.63.0702271356040.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6990","inReplyTo":"E1HM1XL-00071C-N5@candygram.thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-27T12:57:18Z","receivedAt":"2007-02-27T12:57:18Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Feb 2007, Theodore Ts'o wrote:\n\n> \tcvs -r v1.37 -p e2fsck/pass1.c\n\n> git-cat-file and git-show only work on a object identifier (they are \n> low-level plumbing commands).\n\ngit-show, of all, is _not_ plumbing. It is one of the foremost porcelain \nprograms core Git ships.\n\ngit show v.37:e2fsck/pass1.c\n\nIs probably what you want.\n\nCiao,\nDscho\n"},{"id":"35647","messageId":"20070227154241.GA8228@thunk.org","threadId":"6990","inReplyTo":"Pine.LNX.4.63.0702271356040.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: How do get a specific version of a particular file?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-27T15:42:41Z","receivedAt":"2007-02-27T15:42:41Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Feb 27, 2007 at 01:57:18PM +0100, Johannes Schindelin wrote:\n> git-show, of all, is _not_ plumbing. It is one of the foremost porcelain \n> programs core Git ships.\n\nMaybe, but its man page doesn't show it.  The average end-user isn't\ngoing to be thinking about blobs, tree objects, and tag objects.\nFurthermore, the EXAMPLES section in the man page is misformatted due\nto some ASCII doc issues.  I'll send a patch to correct the EXAMPLES\nsection, but if git-show is a foremost porecelain program the\nDISCRIPTION section probably needs to be rewritten as well.\n\n> git show v.37:e2fsck/pass1.c\n\nThanks, I just didn't know about tree-ish:pathname syntax, and I've\nbeen playing with git for a while.\n\nAs a suggestion, maybe we should be moving (or at least copying)\nthings like the <object> identifier syntax from the git-rev-parse\nmanpage (which is plumbing, right?) to the top-level git manpage?  I\ndon't think it's a good idea to force users to read man pages for\nplumbing commands in order to learn key git command-line concepts.\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35648","messageId":"20070227154328.GB8228@thunk.org","threadId":"6990","inReplyTo":"Pine.LNX.4.63.0702271356040.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"[PATCH] Fix git-show man page formatting in the EXAMPLES section","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-27T15:43:28Z","receivedAt":"2007-02-27T15:43:28Z","isPatch":true,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"Fix asciidoc markup so that the man page is properly formatted in the\nEXAMPLES section.\n\nSigned-off-by: \"Theodore Ts'o\" <tytso@mit.edu>\n---\n Documentation/git-show.txt |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex f56f164..5a219ab 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -48,15 +48,15 @@ git show v1.0.0::\n \tShows the tag `v1.0.0`, along with the object the tags\n \tpoints at.\n \n-git show v1.0.0^{tree}::\n+git show v1.0.0^\\{tree\\}::\n \tShows the tree pointed to by the tag `v1.0.0`.\n \n-git show next~10:Documentation/README\n+git show next~10:Documentation/README::\n \tShows the contents of the file `Documentation/README` as\n \tthey were current in the 10th last commit of the branch\n \t`next`.\n \n-git show master:Makefile master:t/Makefile\n+git show master:Makefile master:t/Makefile::\n \tConcatenates the contents of said Makefiles in the head\n \tof the branch `master`.\n \n-- \n1.5.0.1.74.g2470\n"},{"id":"35639","messageId":"Pine.LNX.4.64.0702270830260.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"E1HM1XL-00071C-N5@candygram.thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-27T16:38:59Z","receivedAt":"2007-02-27T16:38:59Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Feb 2007, Theodore Ts'o wrote:\n> \n> git-checkout will only write the output to the working tree.\n> git-cat-file and git-show only work on a object identifier (they are\n> low-level plumbing commands).  \n\nEverybody has already pointed out how easy this actually is, but your \nfundamental mistake was thinking that \"only work on a object identifier\" \nis a bad thing.\n\nRepeat after me: in git, *everything* is a SHA1 object!\n\nSo the problem you had was that \"only\". Remove the \"only\", and realize \nthat object identifiers will cover _all_ you ever need, and be happy.\n\nThat's why\n\n\tgit show <tree>:<path>\n\nworks. All the files are *also* just SHA1 objects, and as a result \nall the normal SHA1 naming rules apply.\n\nThis is also why you can literally do\n\n\tgit diff v1.4.4:Makefile HEAD~5:Makefile\n\nand it will just magically work and do exactly what the command line would \nmake you think it does - even if you didn't know anything at all about \ngit.\n\nBecause \"git diff\" knows about blob objects too, and \"v1.3:Makefile\" is \nthe object name for the blob that was the Makefile object at version \n1.4.4, and HEAD~5:Makefile is the Makefile in the fifth parent of your \ncurrent HEAD.\n\nTell me any other SCM that makes things quite _that_ easy?\n\nSo in Unix, we have \"everything is a file\" (and then we have processes). \nIn git, we have \"everything is a SHA1-named object\" (and then we have \nrevision walking). There's a really simple underlying logic to it all, and \nthe great thing is how _powerful_ it is.\n\nTHIS is what good design is all about. Forget nipples. You just need to \ninternalize the fact that \"everything is a SHA1\".\n\n> So if it is a matter of we don't have an easy way to do this (as opposed\n> to me being stupid or the git documentation just failing to mention it\n> in the right places), what's the best way to add it?\n\nSo not only do we have it, it's probably not mentioned in the docs because \nit is *so* fundamental that nobody even thought to mention any of this \nexcept in the \"how does SHA1 lookup work\" sections.\n\n\t\t\tLinus\n"},{"id":"35642","messageId":"17892.26366.304673.351247@lisa.zopyra.com","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702270830260.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Bill Lear","fromEmail":"rael@zopyra.com","sentAt":"2007-02-27T17:14:38Z","receivedAt":"2007-02-27T17:14:38Z","isPatch":false,"sender":{"key":"rael@zopyra.com","avatar":"https://gravatar.com/avatar/c4f2d2790ca3828d3b4e7dfebabf61d2fe94fd82fa49cdac2a5295dd2d46a874?d=mp&s=160"},"body":"On Tuesday, February 27, 2007 at 08:38:59 (-0800) Linus Torvalds writes:\n>...\n>THIS is what good design is all about. Forget nipples. You just need to \n>internalize the fact that \"everything is a SHA1\".\n\nNipples?  Is this a Windows construct?\n\n\nBill\n"},{"id":"35649","messageId":"20070227190912.GA30080@thunk.org","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702270830260.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-27T19:09:12Z","receivedAt":"2007-02-27T19:09:12Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Feb 27, 2007 at 08:38:59AM -0800, Linus Torvalds wrote:\n> Everybody has already pointed out how easy this actually is, but your \n> fundamental mistake was thinking that \"only work on a object identifier\" \n> is a bad thing.\n> \n> Repeat after me: in git, *everything* is a SHA1 object!\n> \n> So the problem you had was that \"only\". Remove the \"only\", and realize \n> that object identifiers will cover _all_ you ever need, and be happy.\n\nYeah, the problem was that in the git man pages I had read, and the\ngit tutorials that I had read, I had never learned about the\n<tree>:<path> syntax of object identifiers.  So this was more of a\ndocumentation problem than anything else --- I did look and trawlled\nthrough the documentation for quite a while before posting because I\ndidn't want to look stupid, and I still didn't find it.\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35652","messageId":"Pine.LNX.4.64.0702271132130.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"20070227190912.GA30080@thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-27T19:33:36Z","receivedAt":"2007-02-27T19:33:36Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Feb 2007, Theodore Tso wrote:\n> \n> Yeah, the problem was that in the git man pages I had read, and the\n> git tutorials that I had read, I had never learned about the\n> <tree>:<path> syntax of object identifiers.\n\nIt's there in git-rev-parse.txt (which explains all the SHA1 object \n\"math\"), but yeah, it's not exactly obvious, and all the examples tend to \nuse just the \"commit relationship\" math, not the commit->tree->path rules.\n\n\t\tLinus\n"},{"id":"35656","messageId":"Pine.LNX.4.63.0702272053080.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6990","inReplyTo":"20070227154241.GA8228@thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-27T19:55:41Z","receivedAt":"2007-02-27T19:55:41Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Feb 2007, Theodore Tso wrote:\n\n> On Tue, Feb 27, 2007 at 01:57:18PM +0100, Johannes Schindelin wrote:\n> > git-show, of all, is _not_ plumbing. It is one of the foremost porcelain \n> > programs core Git ships.\n> \n> Maybe, but its man page doesn't show it.  The average end-user isn't \n> going to be thinking about blobs, tree objects, and tag objects. \n> Furthermore, the EXAMPLES section in the man page is misformatted due to \n> some ASCII doc issues.  I'll send a patch to correct the EXAMPLES \n> section, but if git-show is a foremost porecelain program the \n> DISCRIPTION section probably needs to be rewritten as well.\n\nThank you for the patch.\n\nSince you seem to be no old-timer who cannot remember how she learnt about \ncertain Git concepts: What documentation did you read, an in which order? \nThis might help us making the parts likely to be seen by new users \nbetter...\n\n> > git show v.37:e2fsck/pass1.c\n> \n> Thanks, I just didn't know about tree-ish:pathname syntax, and I've\n> been playing with git for a while.\n> \n> As a suggestion, maybe we should be moving (or at least copying) things \n> like the <object> identifier syntax from the git-rev-parse manpage \n> (which is plumbing, right?) to the top-level git manpage?\n\nMy vote is for moving, and referencing (kind of mv && ln -s).\n\nBut that means that you have to explain in a really concise way that Git \nrepositories contain blob, tree, commit and tag objects. And what they \nare.\n\nCiao,\nDscho\n"},{"id":"35711","messageId":"20070227223929.GA9027@thunk.org","threadId":"6990","inReplyTo":"Pine.LNX.4.63.0702272053080.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: How do get a specific version of a particular file?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-27T22:39:29Z","receivedAt":"2007-02-27T22:39:29Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Feb 27, 2007 at 08:55:41PM +0100, Johannes Schindelin wrote:\n> Since you seem to be no old-timer who cannot remember how she learnt about \n> certain Git concepts: What documentation did you read, an in which order? \n> This might help us making the parts likely to be seen by new users \n> better...\n\nI started using Everyday git, and the git(7) man page, and the\ntutorials.  I tried using some of the git manpages, but many of them\nwere so inpenetrable that I would just skip over that bit and hope the\nrest of the man page would make sense or would just try searching\nsomewhere for the information.  To be honest, some of the best\ndocumentation was Linus's email messages on the git mailing list,\nespecially the ones about git philosophy and examples about how to do\nthings.\n\nFor example, the man page of git-rev-parse will give you a very dry\ndescription of \"..\" and \"...\", but absolutely no examples of when you\nwould you might use one or the other.  The only place where I learned\nabout this was from some of Linus's e-mail messages, and even then I'm\nstill a little shaky on when you might use '...'.   \n\nAnd I'm still not sure why\n\n\tgit show v1.5.0..v1.5.0.1 \n\ndoesn't throw an error, and why it prints what it does...\n\n> > As a suggestion, maybe we should be moving (or at least copying) things \n> > like the <object> identifier syntax from the git-rev-parse manpage \n> > (which is plumbing, right?) to the top-level git manpage?\n> \n> My vote is for moving, and referencing (kind of mv && ln -s).\n> \n> But that means that you have to explain in a really concise way that Git \n> repositories contain blob, tree, commit and tag objects. And what they \n> are.\n\nWell, git(7) already has an extraordinary verbose description of glob,\ntree, commit, and tag options, so if we move the object id syntax to\ngit(7) that wouldn't be a problem.  :-)\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35724","messageId":"86vehnnpy2.fsf@blue.stonehenge.com","threadId":"6990","inReplyTo":"20070227223929.GA9027@thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2007-02-27T23:25:25Z","receivedAt":"2007-02-27T23:25:25Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Theodore\" == Theodore Tso <tytso@mit.edu> writes:\n\nTheodore> And I'm still not sure why\n\nTheodore> \tgit show v1.5.0..v1.5.0.1 \n\nTheodore> doesn't throw an error, and why it prints what it does...\n\nWait, that doesn't throw an error?\n\n(tries it)\n\nOK, how is that different from git-diff ?\n\n/me scratches head\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"35726","messageId":"7vfy8rb2do.fsf@assigned-by-dhcp.cox.net","threadId":"6990","inReplyTo":"86vehnnpy2.fsf@blue.stonehenge.com","subject":"Re: How do get a specific version of a particular file?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-27T23:35:15Z","receivedAt":"2007-02-27T23:35:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"merlyn@stonehenge.com (Randal L. Schwartz) writes:\n\n>>>>>> \"Theodore\" == Theodore Tso <tytso@mit.edu> writes:\n>\n> Theodore> And I'm still not sure why\n>\n> Theodore> \tgit show v1.5.0..v1.5.0.1 \n>\n> Theodore> doesn't throw an error, and why it prints what it does...\n>\n> Wait, that doesn't throw an error?\n>\n> (tries it)\n>\n> OK, how is that different from git-diff ?\n\nI do not think there is any difference.  \"show\" is about\nmultiple points, not ranges.  \"diff\" is about multiple\n(typically two) points, and not ranges.\n"},{"id":"35737","messageId":"Pine.LNX.4.63.0702280059050.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6990","inReplyTo":"86vehnnpy2.fsf@blue.stonehenge.com","subject":"Re: How do get a specific version of a particular file?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-28T00:01:13Z","receivedAt":"2007-02-28T00:01:13Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Feb 2007, Randal L. Schwartz wrote:\n\n> >>>>> \"Theodore\" == Theodore Tso <tytso@mit.edu> writes:\n> \n> Theodore> And I'm still not sure why\n> \n> Theodore> \tgit show v1.5.0..v1.5.0.1 \n> \n> Theodore> doesn't throw an error, and why it prints what it does...\n> \n> Wait, that doesn't throw an error?\n> \n> (tries it)\n> \n> OK, how is that different from git-diff ?\n\n\t$ git diff v1.5.0..v1.5.0.1\n\nshows the differences between those two \nversions;\n\n\t$ git show v1.5.0..v1.5.0.1\n\nis _identical_ to\n\n\t$ git show v1.5.0 v1.5.0.1\n\nand shows the same as\n\n\t$ git show v1.5.0; git show v1.5.0.1\n\ni.e. the commit diffs of both commits.\n\nCiao,\nDscho\n"},{"id":"35740","messageId":"Pine.LNX.4.64.0702271605290.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"7vfy8rb2do.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-28T00:22:52Z","receivedAt":"2007-02-28T00:22:52Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Feb 2007, Junio C Hamano wrote:\n\n> merlyn@stonehenge.com (Randal L. Schwartz) writes:\n> \n> >>>>>> \"Theodore\" == Theodore Tso <tytso@mit.edu> writes:\n> >\n> > Theodore> And I'm still not sure why\n> >\n> > Theodore> \tgit show v1.5.0..v1.5.0.1 \n> >\n> > Theodore> doesn't throw an error, and why it prints what it does...\n> >\n> > Wait, that doesn't throw an error?\n> >\n> > (tries it)\n> >\n> > OK, how is that different from git-diff ?\n> \n> I do not think there is any difference.  \"show\" is about\n> multiple points, not ranges.  \"diff\" is about multiple\n> (typically two) points, and not ranges.\n\nWell, I do think Ted has a good point. Having negative refs makes no sense \nfor the \"no-walk\" case (aka \"git show\").\n\nSo when we do\n\n\tgit show v1.4.4..v1.5.0\n\nthat's an illogical thing to do, since \"git show\" is defined to be a \nnon-revision-walking action, which means the range operator be pointless \nand wrong. The fact that we happily accept it (and then _only_ show \nv1.5.0, which is the positive end of the range) is quite arguably not very \nlogical.\n\nWe should complain, and say that you can only do \"no_walk\" with positive \nrefs. Negative object refs really don't make any sense unless you walk \nthe obejct list (or you're \"git diff\" and know about ranges explicitly).\n\nSomething like this (although I don't know if my message is necessarily \nthe best possible one).\n\n\t\tLinus\n\n---\ndiff --git a/revision.c b/revision.c\nindex 4cf697e..b84c066 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -116,6 +116,8 @@ void mark_parents_uninteresting(struct commit *commit)\n \n void add_pending_object(struct rev_info *revs, struct object *obj, const char *name)\n {\n+\tif (revs->no_walk && (obj->flags & UNINTERESTING))\n+\t\tdie(\"object ranges do not make sense when not walking revisions\");\n \tadd_object_array(obj, name, &revs->pending);\n \tif (revs->reflog_info && obj->type == OBJ_COMMIT)\n \t\tadd_reflog_for_walk(revs->reflog_info,\n"},{"id":"35741","messageId":"Pine.LNX.4.64.0702271626410.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"Pine.LNX.4.63.0702280059050.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-28T00:30:34Z","receivedAt":"2007-02-28T00:30:34Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 28 Feb 2007, Johannes Schindelin wrote:\n> \n> \t$ git show v1.5.0..v1.5.0.1\n> \n> is _identical_ to\n> \n> \t$ git show v1.5.0 v1.5.0.1\n\nNo, it's not.\n\nTry it.\n\nFor one thing, the \"..\" format makes no sense with something that \ndoesn't actually walk the range (it _does_ make sense for \"diff\", because \nwhile it doesn't \"walk the range\", it does show the _result_ of walking \nthat the range - \"diff\" really is special, since by definition it's about \nend-poits).\n\nFor another, \"git show\" actually uses \"cmd_log_walk()\" for showing \ncommits, which in turn uses get_revision(), which in turn will _ignore_ \nany commit that you've marked uninteresting.\n\nSo it will *not* show the commit that is v1.5.0.\n\nSo I agree with Ted: \"git show\" as it is now is not logical with commit \nranges. I sent out a patch that I think at least makes it sensible, \nalthough I'm not claiming that it's necessarily the only way to handle it.\n\n\t\tLinus\n"},{"id":"35742","messageId":"7vejob9l70.fsf@assigned-by-dhcp.cox.net","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271605290.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-28T00:31:47Z","receivedAt":"2007-02-28T00:31:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n>> > OK, how is that different from git-diff ?\n>> \n>> I do not think there is any difference.  \"show\" is about\n>> multiple points, not ranges.  \"diff\" is about multiple\n>> (typically two) points, and not ranges.\n>\n> Well, I do think Ted has a good point. Having negative refs makes no sense \n> for the \"no-walk\" case (aka \"git show\").\n>\n> ... Negative object refs really don't make any sense unless you walk \n> the object list (or you're \"git diff\" and know about ranges explicitly).\n\nIf you did not say \"(or you're...\" part, then I would agree\nto this 100%.\n\nOn the other hand, as you earlier said:\n\n    On Fri, 22 Dec 2006,...\n    > \n    > I can understand the advantage of a shortcut like \"git diff ..next\",\n    > ...\n\n    I can't understand why people complain about this.\n\n    YOU DON'T HAVE TO USE IT. \n    ...\n    > But, really, I still don't understand exactly _what_ \"diff a..b\" even\n    > means. Can you explain it to me?\n\n    It means exactly the same as \"diff a b\".\n\n    It's that simple.\n\nwhich made me lol, I am very tempted to say:\n\n\tIt means exactly the same as \"show a b\".\n\n        It's that simple.\n\nBack to serious my self, I am wondering if this is a sensible\nthing to ask:\n\n\t$ git show master...maint\n\nwhich your patch now forbids.\n"},{"id":"35743","messageId":"7v8xej9l4c.fsf@assigned-by-dhcp.cox.net","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271626410.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-28T00:33:23Z","receivedAt":"2007-02-28T00:33:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> So it will *not* show the commit that is v1.5.0.\n\nAh, sorry, I missed that part.\n"},{"id":"35744","messageId":"Pine.LNX.4.63.0702280135350.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271626410.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-28T00:36:01Z","receivedAt":"2007-02-28T00:36:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Feb 2007, Linus Torvalds wrote:\n\n> On Wed, 28 Feb 2007, Johannes Schindelin wrote:\n> > \n> > \t$ git show v1.5.0..v1.5.0.1\n> > \n> > is _identical_ to\n> > \n> > \t$ git show v1.5.0 v1.5.0.1\n> \n> No, it's not.\n\nMy fault. Crossed eyes...\n\nCiao,\nDscho\n"},{"id":"35745","messageId":"Pine.LNX.4.63.0702280137460.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6990","inReplyTo":"7vejob9l70.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do get a specific version of a particular file?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-02-28T00:39:17Z","receivedAt":"2007-02-28T00:39:17Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Feb 2007, Junio C Hamano wrote:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n> \n> >> > OK, how is that different from git-diff ?\n> >> \n> >> I do not think there is any difference.  \"show\" is about\n> >> multiple points, not ranges.  \"diff\" is about multiple\n> >> (typically two) points, and not ranges.\n> >\n> > Well, I do think Ted has a good point. Having negative refs makes no sense \n> > for the \"no-walk\" case (aka \"git show\").\n> >\n> > ... Negative object refs really don't make any sense unless you walk \n> > the object list (or you're \"git diff\" and know about ranges explicitly).\n> \n> If you did not say \"(or you're...\" part, then I would agree\n> to this 100%.\n\ngit diff does not set revs->no_walk, so the patch would not trigger for \ngit-diff.\n\nCiao,\nDscho\n"},{"id":"35746","messageId":"Pine.LNX.4.64.0702271643080.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"7vejob9l70.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-28T00:54:39Z","receivedAt":"2007-02-28T00:54:39Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Feb 2007, Junio C Hamano wrote:\n> >\n> > ... Negative object refs really don't make any sense unless you walk \n> > the object list (or you're \"git diff\" and know about ranges explicitly).\n> \n> If you did not say \"(or you're...\" part, then I would agree\n> to this 100%.\n\nWell, I personally see (and think) of \"..\" as a \"difference operator\".\n\nIt very much is that, both for \"git diff\" and for \"git log\".\n\nIt's just that the \"differences\" are different.\n\nIn \"git diff\", the difference is obviously the code difference. When you \nsay \"git diff a..b\" to \"show the difference between a and b\", you mean \n\"show the patch\". When you say \"git log a..b\", it's *still* a \n\"difference\", but now it's the *set* difference of the commits.\n\nBut \"a..b\" makes sense to me in both cases, exactly because to me, \"a..b\" \n_literally_ means \"b - a\" or \"the difference between a and b\".\n\nMaybe I'm odd, or maybe it's because I have a fairly strong math \nbackground, but I have no trouble at all with a \"difference operator\" that \ndoes different things.\n\nIn real algebra (what in the US is apparently called \"abstract algebra\", \nand not to be confused with just \"arithmetic with unknowns\"), you do \ngeneralized arithmetic operations, and using \"+\" and \"-\" and \"*\" to mean \narbitrary things that depend on the stuff you operate on, and doing \ndifferent things depending on whether you talk about a \"set of commits\" \n(log) or talking about a \"set of source code\" (diff), makes total sense \nmathematically.\n\n\n> On the other hand, as you earlier said:\n> \n>     On Fri, 22 Dec 2006,...\n>     > \n>     > I can understand the advantage of a shortcut like \"git diff ..next\",\n>     > ...\n> \n>     I can't understand why people complain about this.\n> \n>     YOU DON'T HAVE TO USE IT. \n>     ...\n>     > But, really, I still don't understand exactly _what_ \"diff a..b\" even\n>     > means. Can you explain it to me?\n> \n>     It means exactly the same as \"diff a b\".\n> \n>     It's that simple.\n> \n> which made me lol, I am very tempted to say:\n> \n> \tIt means exactly the same as \"show a b\".\n> \n>         It's that simple.\n\nNo, it really makes no sense at all if you see \"a..b\" as being a \n\"difference operator\".\n\nWhat is the difference between two commits? It's either the difference in \ncode (diff) _or_ it's the difference in sets of commits (log), and either \nis logical, but which one should \"git show\" actually show?\n\nIn NO CASE is it logical to say that \"git show a..b\" makes the \n\"difference\" be the \"union\" of two commits. That's just confusing and odd.\n\n> Back to serious my self, I am wondering if this is a sensible\n> thing to ask:\n> \n> \t$ git show master...maint\n> \n> which your patch now forbids.\n\nAgain, what would that *mean*?\n\nThe \"...\" operator is the \"symmetric difference\". It has meaning both for \ncode and for commit sets, but which one is \"show\"?\n\n\t\tLinus\n"},{"id":"35747","messageId":"alpine.LRH.0.82.0702272001440.29426@xanadu.home","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271605290.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-02-28T01:04:29Z","receivedAt":"2007-02-28T01:04:29Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Tue, 27 Feb 2007, Linus Torvalds wrote:\n\n> We should complain, and say that you can only do \"no_walk\" with positive \n> refs. Negative object refs really don't make any sense unless you walk \n> the obejct list (or you're \"git diff\" and know about ranges explicitly).\n> \n> Something like this (although I don't know if my message is necessarily \n> the best possible one).\n\nIt could be improved a little.\n\nWhat about \"a single object specification only must be provided\" \ninstead?\n\n\nNicolas\n"},{"id":"35748","messageId":"alpine.LRH.0.82.0702272004370.29426@xanadu.home","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271643080.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-02-28T01:11:00Z","receivedAt":"2007-02-28T01:11:00Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Tue, 27 Feb 2007, Linus Torvalds wrote:\n\n> In real algebra (what in the US is apparently called \"abstract algebra\", \n> and not to be confused with just \"arithmetic with unknowns\"), you do \n> generalized arithmetic operations, and using \"+\" and \"-\" and \"*\" to mean \n> arbitrary things that depend on the stuff you operate on, and doing \n> different things depending on whether you talk about a \"set of commits\" \n> (log) or talking about a \"set of source code\" (diff), makes total sense \n> mathematically.\n\n/me wonders why Linux wasn't written in C++ with overloaded operators...\n\n\nNicolas\n"},{"id":"35750","messageId":"Pine.LNX.4.64.0702271719300.12485@woody.linux-foundation.org","threadId":"6990","inReplyTo":"alpine.LRH.0.82.0702272004370.29426@xanadu.home","subject":"Re: How do get a specific version of a particular file?","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-02-28T01:24:54Z","receivedAt":"2007-02-28T01:24:54Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 27 Feb 2007, Nicolas Pitre wrote:\n> \n> /me wonders why Linux wasn't written in C++ with overloaded operators...\n\nActually, there was a short while that we tried it.\n\nIn the end, we ended up using the C pre-processor (and some gcc hackery) \ninstead, since it's just superior to the mess that is C++.\n\nSee \"<asm/uaccess.h>\" and various other header files, and realize that we \nhave overloaded operations for things like \"get_user()\" and \"xchg()\" and \nfriends.\n\nOverloading of operators wouldn't be very useful, though: it really only \npays in either real math (where having \"+\" etc do the right thing for \ncomplex numbers/vectors/matrices/whatever is totally unambiguous and just \nmakes code a lot more readable) or with really trivial stuff (ie \"+\" for \nstring concatenation).\n\nOutside of math and really trivial stuff, it's just a horribly bad idea, \nbecause it just makes for subtle and hard to understand code.\n\nSame largely goes for overloading of functions too, for that matter, \nexcept for the cases where you really can pretty much do it by argument \nsize (and then the C preprocessor and few gcc extensions actually generate \nbetter and more readable code than C++ ever did - which is admittedly \nnot saying a whole lot).\n\n\t\tLinus\n"},{"id":"35752","messageId":"alpine.LRH.0.82.0702272040050.29426@xanadu.home","threadId":"6990","inReplyTo":"Pine.LNX.4.64.0702271719300.12485@woody.linux-foundation.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-02-28T01:48:44Z","receivedAt":"2007-02-28T01:48:44Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Tue, 27 Feb 2007, Linus Torvalds wrote:\n\n> \n> \n> On Tue, 27 Feb 2007, Nicolas Pitre wrote:\n> > \n> > /me wonders why Linux wasn't written in C++ with overloaded operators...\n> \n> Actually, there was a short while that we tried it.\n\nI know.  Amusing piece of history.\n\n> Overloading of operators wouldn't be very useful, though: it really only \n> pays in either real math (where having \"+\" etc do the right thing for \n> complex numbers/vectors/matrices/whatever is totally unambiguous and just \n> makes code a lot more readable) or with really trivial stuff (ie \"+\" for \n> string concatenation).\n\nWell...   We could have >> and << to replace memcpy(), copy_to_user(), \ncopy_from_user(), and select the appropriate method depending on whether \none is a user space pointer.\n\nOr spin_lock++ and spin_lock--.\n\nOr written_data >> file >> filesystem, replacing all fops methods with \noperators as well.\n\n;-)\n\n> Outside of math and really trivial stuff, it's just a horribly bad idea, \n> because it just makes for subtle and hard to understand code.\n\nIndeed.  Well it can make the intent of the code clearer but certainly \nnot its implementation.\n\n\nNicolas\n"},{"id":"35755","messageId":"20070228023208.GC2178@thunk.org","threadId":"6990","inReplyTo":"7vejob9l70.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do get a specific version of a particular file?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-28T02:32:08Z","receivedAt":"2007-02-28T02:32:08Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Feb 27, 2007 at 04:31:47PM -0800, Junio C Hamano wrote:\n> Back to serious my self, I am wondering if this is a sensible\n> thing to ask:\n> \n> \t$ git show master...maint\n> \n> which your patch now forbids.\n\nWell, the other design alternative is to make git-show take a list of\nobjects, so that\n\n\tgit show v1.5.0..v1.5.0.1\n\nends up displaying the same thing as\n\n\tgit show `git-rev-list v1.5.0..v1.5.0.1`\n\n... but I'm not really convinced that's really all that useful.  \n\nAlso, at the moment the git-show man page states the following:\n\n       <object>\n              The name of the object to show. For a more complete list of ways\n              to spell object names, see  \"SPECIFYING  REVISIONS\"  section  in\n              git-rev-parse(1).\n\nNote the use of singular.  That would imply that it takes a single\nobject, and not a range of objects.  Of course, if the above behavior\nwere actually shown to be useful, man pages can always be easily\nchanged.  :-)\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35757","messageId":"7vr6sb2e5m.fsf@assigned-by-dhcp.cox.net","threadId":"6990","inReplyTo":"20070228023208.GC2178@thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-28T02:45:41Z","receivedAt":"2007-02-28T02:45:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Theodore Tso <tytso@mit.edu> writes:\n\n> Well, the other design alternative is to make git-show take a list of\n> objects, so that\n>\n> \tgit show v1.5.0..v1.5.0.1\n>\n> ends up displaying the same thing as\n>\n> \tgit show `git-rev-list v1.5.0..v1.5.0.1`\n>\n> ... but I'm not really convinced that's really all that useful.  \n\nI think we are better off doing \"git show v1.5.0..v1.5.0.1\" for\nthat, but we do take multiple objects.\n\n> Note the use of singular.  That would imply that it takes a single\n> object, and not a range of objects.  Of course, if the above behavior\n> were actually shown to be useful, man pages can always be easily\n> changed.  :-)\n\nI find myself running \"git show --stat v1.X.Y v1.X.Y+1\" every\ntime I tag a new release Y+2 to find out things like:\n\n\t* Should I say \"Git v1.5.1\" or \"GIT 1.5.1\"?\n\t* Ah, I have to update GIT-VERSION-GEN, which I did, good.\n"},{"id":"35760","messageId":"20070228030347.GE2178@thunk.org","threadId":"6990","inReplyTo":"7vr6sb2e5m.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do get a specific version of a particular file?","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2007-02-28T03:03:47Z","receivedAt":"2007-02-28T03:03:47Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Feb 27, 2007 at 06:45:41PM -0800, Junio C Hamano wrote:\n> Theodore Tso <tytso@mit.edu> writes:\n> \n> > Well, the other design alternative is to make git-show take a list of\n> > objects, so that\n> >\n> > \tgit show v1.5.0..v1.5.0.1\n> >\n> > ends up displaying the same thing as\n> >\n> > \tgit show `git-rev-list v1.5.0..v1.5.0.1`\n> >\n> > ... but I'm not really convinced that's really all that useful.  \n> \n> I think we are better off doing \"git show v1.5.0..v1.5.0.1\" for\n> that, but we do take multiple objects.\n\nNot sure I understand what you mean?  That:\n\n\tgit show v1.5.0..v1.5.0.1\n\nshould should show all the commits between v1.5.0 and v1.5.0.1, or\njust print the commit corresponding to v1.5.0.1 (and the v1.5.0 is\ncompletely meaningless?)\n\n> > Note the use of singular.  That would imply that it takes a single\n> > object, and not a range of objects.  Of course, if the above behavior\n> > were actually shown to be useful, man pages can always be easily\n> > changed.  :-)\n> \n> I find myself running \"git show --stat v1.X.Y v1.X.Y+1\" every\n> time I tag a new release Y+2 to find out things like:\n> \n> \t* Should I say \"Git v1.5.1\" or \"GIT 1.5.1\"?\n> \t* Ah, I have to update GIT-VERSION-GEN, which I did, good.\n\nBut why not just type:\n\n\tgit show --stat v1.X.Y+1\n\ninstead?  Or if you don't want the tag information, you could type:\n\n\tgit show --stat v1.X.Y+1^{commit}\n\nsince \n\n\tgit show --stat v1.5.0..v1.5.0.1\nand\n\tgit show --stat v1.4.4.0..v1.5.0.1\nand\n\tgit show --stat v1.0.0..v1.5.0.1\n\nall print exactly the same thing!  \n\nHence Linus's and my argument that as currently implemented the\n\"..\" operator to git doesn't make a lot of sense....\n\n\t\t\t\t\t\t- Ted\n"},{"id":"35772","messageId":"7vmz2y3npo.fsf@assigned-by-dhcp.cox.net","threadId":"6990","inReplyTo":"20070228030347.GE2178@thunk.org","subject":"Re: How do get a specific version of a particular file?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-28T04:33:55Z","receivedAt":"2007-02-28T04:33:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Theodore Tso <tytso@mit.edu> writes:\n\n> On Tue, Feb 27, 2007 at 06:45:41PM -0800, Junio C Hamano wrote:\n>> Theodore Tso <tytso@mit.edu> writes:\n>> \n>> > Well, the other design alternative is to make git-show take a list of\n>> > objects, so that\n>> >\n>> > \tgit show v1.5.0..v1.5.0.1\n>> >\n>> > ends up displaying the same thing as\n>> >\n>> > \tgit show `git-rev-list v1.5.0..v1.5.0.1`\n>> >\n>> > ... but I'm not really convinced that's really all that useful.  \n>> \n>> I think we are better off doing \"git show v1.5.0..v1.5.0.1\" for\n>> that, but we do take multiple objects.\n>\n> Not sure I understand what you mean?  That:\n\nI don't either.\n\nI thought I was writing \"git log v1.5.0..v1.5.0.1\".\n\nSorry for the confusion.\n"}]}