{"thread":{"id":"13676","subject":"rev-parse doesn't take pwd into consideration","startedAt":"2008-05-26T19:58:12Z","lastAt":"2008-05-27T10:53:27Z","messageCount":11,"participants":["Luciano Rocha","Junio C Hamano","Teemu Likonen","しらいしななこ","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77792","messageId":"20080526195812.GA23396@bit.office.eurotux.com","threadId":"13676","inReplyTo":null,"subject":"rev-parse doesn't take pwd into consideration","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-05-26T19:58:12Z","receivedAt":"2008-05-26T19:58:12Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"\nHello,\n\nI was frustrated for some minutes trying to get the HEAD version of a\nfile, as is in the documentation. Using git's source as an example:\ngit/Documentation$ git show HEAD:docbook.xsl\nfatal: ambiguous argument 'HEAD:docbook.xsl': unknown revision or path\nnot in the working tree.\nUse '--' to separate paths from revisions\n\n<hmmm>\n\n$ git show HEAD -- docbook.xsl\n<nil>\n$\n\nSeeing in the documentation that the parsing was made by git-rev-parse,\nI tried running git-rev-parse directly, ending with the same error.\n\nI tried with the full path, just in case, but it didn't work also\n($PWD/docbook.xsl).\n\nUntil finally I tried the absolute path as git is concerned, and it\nworked.\n\nIt works anywhere:\ngit$ git show HEAD:Documentation/docbook.xsl\n<contents>\ngit/Documentation$ git show HEAD:Documentation/docbook.xsl\n<contents>\n...\n\nIs it difficult to make rev-parse accept relative path specifications?\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"77793","messageId":"7vhcckddov.fsf@gitster.siamese.dyndns.org","threadId":"13676","inReplyTo":"20080526195812.GA23396@bit.office.eurotux.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-26T20:15:44Z","receivedAt":"2008-05-26T20:15:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This was discussed to death.  Check the list archive.\n"},{"id":"77794","messageId":"20080526201842.GA8194@mithlond.arda.local","threadId":"13676","inReplyTo":"20080526195812.GA23396@bit.office.eurotux.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-05-26T20:18:42Z","receivedAt":"2008-05-26T20:18:42Z","isPatch":false,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Luciano Rocha wrote (2008-05-26 20:58 +0100):\n\n> Is it difficult to make rev-parse accept relative path specifications?\n\nI don't know but let's consider this: The revision user is asking for\nwith \"git show <commit>:<path>\" may not even contain the directory user\nis currently in. Also, there may not be any working directory at all, or\nuser may be completely outside the repository and using \"git\n--git-dir=/somewhere/else\". I guess the system is much simpler as the\n\"<commit>:\" always refers to repository's root.\n\nIf you are using Git's bash completions it's easy to complete paths with\n\"git show <commit>:\". For example, try\n\n  $ git show HEAD~10:Docum<tab>\n\nand the path is completed.\n"},{"id":"77796","messageId":"20080526205248.GB23396@bit.office.eurotux.com","threadId":"13676","inReplyTo":"20080526201842.GA8194@mithlond.arda.local","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-05-26T20:52:48Z","receivedAt":"2008-05-26T20:52:48Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Mon, May 26, 2008 at 11:18:42PM +0300, Teemu Likonen wrote:\n> Luciano Rocha wrote (2008-05-26 20:58 +0100):\n> \n> > Is it difficult to make rev-parse accept relative path specifications?\n> \n> I don't know but let's consider this: The revision user is asking for\n> with \"git show <commit>:<path>\" may not even contain the directory user\n> is currently in. Also, there may not be any working directory at all, or\n> user may be completely outside the repository and using \"git\n> --git-dir=/somewhere/else\". I guess the system is much simpler as the\n> \"<commit>:\" always refers to repository's root.\n\nIf <commit>:<path> is valid assuming the repository's root, then use it.\nIf it isn't, try <commit>:<path_to_git_root>/<path>.\n\n> If you are using Git's bash completions it's easy to complete paths with\n> \"git show <commit>:\". For example, try\n\nI find bash-completion more an hassle than useful, thanks anyway.\n\n>   $ git show HEAD~10:Docum<tab>\n> \n> and the path is completed.\n\nBut a user usually thinks relative to the current directory, not to the\nproject's root.\n\nBut I should check the archives before any further discussion, as Junio\nC Hamano observed.\n\nThanks for your input.\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"77801","messageId":"200805262135.m4QLZtpq023003@mi0.bluebottle.com","threadId":"13676","inReplyTo":"7vhcckddov.fsf@gitster.siamese.dyndns.org","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2008-05-26T21:35:10Z","receivedAt":"2008-05-26T21:35:10Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com> writes:\n\n> This was discussed to death.  Check the list archive.\n\nJunio, sometimes I think you are being very mean.  I am reasonably sure you meant this one, but why didn't you give a pointer for him?\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nGet a free email address with REAL anti-spam protection.\nhttp://www.bluebottle.com/tag/1\n"},{"id":"77803","messageId":"alpine.DEB.1.00.0805262239060.30431@racer","threadId":"13676","inReplyTo":"7vhcckddov.fsf@gitster.siamese.dyndns.org","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-26T21:42:28Z","receivedAt":"2008-05-26T21:42:28Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 26 May 2008, Junio C Hamano wrote:\n\n> This was discussed to death.  Check the list archive.\n\nFWIW I have a patch in my personal fork that allows \"git show HEAD:./bla\":\n\nhttp://repo.or.cz/w/git/dscho.git?a=commitdiff;h=3007b5c53d9b571f992f3e2d801248ff0bd15c76\n\nIf you like the patch, you are free to push for inclusion; I do not need \nit myself, and wasted enough time in writing it, so I will not waste any \nmore time with it.\n\nCiao,\nDscho\n"},{"id":"77804","messageId":"alpine.DEB.1.00.0805262243061.30431@racer","threadId":"13676","inReplyTo":"200805262135.m4QLZtpq023003@mi0.bluebottle.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-26T21:44:35Z","receivedAt":"2008-05-26T21:44:35Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 May 2008, しらいしななこ wrote:\n\n> Quoting Junio C Hamano <gitster@pobox.com> writes:\n> \n> > This was discussed to death.  Check the list archive.\n> \n> Junio, sometimes I think you are being very mean.  I am reasonably sure \n> you meant this one, but why didn't you give a pointer for him?\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n\nNote that it takes a little bit of time for every such request to find the \npointer.  A little bit of time times a many times makes quite some time.\n\nI think it is _not_ asking too much to expect people to do _basic_ \nresearch.\n\nAnd yes, searching the mailing list (if a simple Google search is not \nenough) _does_ qualify for \"basic research\".\n\nCiao,\nDscho\n"},{"id":"77806","messageId":"7vprr84tzc.fsf@gitster.siamese.dyndns.org","threadId":"13676","inReplyTo":"200805262135.m4QLZtpq023003@mi0.bluebottle.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-26T21:48:39Z","receivedAt":"2008-05-26T21:48:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"しらいしななこ  <nanako3@bluebottle.com> writes:\n\n> Quoting Junio C Hamano <gitster@pobox.com> writes:\n>\n>> This was discussed to death.  Check the list archive.\n>\n> Junio, sometimes I think you are being very mean.  I am reasonably sure you meant this one, but why didn't you give a pointer for him?\n\nWell, because my response roughly translates to \"Your lack of research\nbefore posting would have wasted other's time, don't do it\", I _could_\nhave spent some time researching before posting to keep Luciano from\nspending his time on going back to the list archive.  Setting a good\nexample, so to speak.\n\nIn that sense, perhaps you may have a point.\n\nBut I do not think I (or we collectively as the project) can afford to\nkeep doing that in the longer term.  A minute lost for me is a minute lost\nfor the project to review and integrate changes that others spent dozens\nof minutes, perhaps hours, to come up with.  So I should not be constantly\ndoing the archive research for other people.\n\nMy response might have been mean, and I instead could have ignored it and\nallow the thread to waste time of others responding to it, but that would\nhave been a worse alternative than nipping it off in the bud.  I am not\nsure what better alternatives there were, other than having a dedicated\nsecretary/librarian to do the archive research for the community.\n\n> http://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n\nYeah, that's the one I had in mind.  I like quoting the threaded interface\nfrom gmane --- it makes the context of old discussion very clear.\n\nThanks.\n"},{"id":"77809","messageId":"20080526221425.GA29854@bit.office.eurotux.com","threadId":"13676","inReplyTo":"200805262135.m4QLZtpq023003@mi0.bluebottle.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-05-26T22:14:25Z","receivedAt":"2008-05-26T22:14:25Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Tue, May 27, 2008 at 06:35:10AM +0900, しらいしななこ wrote:\n> Quoting Junio C Hamano <gitster@pobox.com> writes:\n> \n> > This was discussed to death.  Check the list archive.\n> \n> Junio, sometimes I think you are being very mean.  I am reasonably sure you meant this one, but why didn't you give a pointer for him?\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n\nThanks for the pointer.\n\nRegards,\nLuciano Rocha\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"77815","messageId":"20080526231441.GA2508@bit.office.eurotux.com","threadId":"13676","inReplyTo":"200805262135.m4QLZtpq023003@mi0.bluebottle.com","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-05-26T23:14:41Z","receivedAt":"2008-05-26T23:14:41Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Tue, May 27, 2008 at 06:35:10AM +0900, しらいしななこ wrote:\n> Quoting Junio C Hamano <gitster@pobox.com> writes:\n> \n> > This was discussed to death.  Check the list archive.\n> \n> Junio, sometimes I think you are being very mean.  I am reasonably sure you meant this one, but why didn't you give a pointer for him?\n> \n> http://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n\nWell, that clears things up. Thanks again.\n\nI've thought of changing only the git-show command, but I've since\nrealized that it will imply changing critical code used by every\ncommand.\n\nSo I'll be content with git-showrel. :)\n\nBest regards,\nLuciano Rocha\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"77845","messageId":"200805271054.m4RAs3NE004265@mi0.bluebottle.com","threadId":"13676","inReplyTo":"7vprr84tzc.fsf@gitster.siamese.dyndns.org","subject":"Re: rev-parse doesn't take pwd into consideration","fromName":"しらいしななこ","fromEmail":"nanako3@bluebottle.com","sentAt":"2008-05-27T10:53:27Z","receivedAt":"2008-05-27T10:53:27Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com>:\n\n> But I do not think I (or we collectively as the project) can afford to\n> keep doing that in the longer term.  A minute lost for me is a minute lost\n> for the project to review and integrate changes that others spent dozens\n> of minutes, perhaps hours, to come up with.  So I should not be constantly\n> doing the archive research for other people.\n\nI agree that your time is more valuable.\n\n> My response might have been mean, and I instead could have ignored it and\n> allow the thread to waste time of others responding to it, but that would\n> have been a worse alternative than nipping it off in the bud.  I am not\n> sure what better alternatives there were, other than having a dedicated\n> secretary/librarian to do the archive research for the community.\n>\n>> http://thread.gmane.org/gmane.comp.version-control.git/68786/focus=68852\n>\n> Yeah, that's the one I had in mind.  I like quoting the threaded interface\n> from gmane --- it makes the context of old discussion very clear.\n\nI remembered that you were not so happy when I pointed at marc.info the last time.  I can learn (^_^).\n\nAnd it was very easy to find the discussion in gmane (I asked \"relative cwd path blob\" and the discussion was the first in the list).\n\n> Thanks.\n\nYou are wellcome (^_^).\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n\n----------------------------------------------------------------------\nFree pop3 email with a spam filter.\nhttp://www.bluebottle.com/tag/5\n"}]}