{"thread":{"id":"17589","subject":"RFH: git show HEAD:$SUBMODULE","startedAt":"2009-02-05T16:46:51Z","lastAt":"2009-02-05T17:35:53Z","messageCount":2,"participants":["Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103352","messageId":"alpine.DEB.1.00.0902051744520.7491@intel-tinevez-2-302","threadId":"17589","inReplyTo":null,"subject":"RFH: git show HEAD:$SUBMODULE","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-02-05T16:46:51Z","receivedAt":"2009-02-05T16:46:51Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nat the moment, 'show HEAD:$SUBMODULE' fails horribly, as git-show abuses \nthe revision walker to parse the command line parameters, and the revision \nwalker does not like a non-existing commit.\n\nInstead, it would be nicer to show the user something like\n\n\tHEAD:$SUBMODULE\n\tsubmodule at commit $COMMIT_NAME\n\nHowever, I have no clue how to go about getting that.  I want to avoid \nhaving to parse the parameters twice, but I also do not want to fsck up \nthe revision walker...\n\nIdeas?\n\nCiao,\nDscho\n"},{"id":"103356","messageId":"7vwsc4eqh2.fsf@gitster.siamese.dyndns.org","threadId":"17589","inReplyTo":"alpine.DEB.1.00.0902051744520.7491@intel-tinevez-2-302","subject":"Re: RFH: git show HEAD:$SUBMODULE","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-05T17:35:53Z","receivedAt":"2009-02-05T17:35:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> at the moment, 'show HEAD:$SUBMODULE' fails horribly, as git-show abuses \n> the revision walker to parse the command line parameters, and the revision \n> walker does not like a non-existing commit.\n>\n> Instead, it would be nicer to show the user something like\n>\n> \tHEAD:$SUBMODULE\n> \tsubmodule at commit $COMMIT_NAME\n>\n> However, I have no clue how to go about getting that.  I want to avoid \n> having to parse the parameters twice, but I also do not want to fsck up \n> the revision walker...\n>\n> Ideas?\n\nThis is not an idea but it falls into the same category as handling this\nin a way different from the current code.\n\n\t$ cd Documentation\n        $ git show HEAD:git.txt\n\nYou really shouldn't letting revision machinery to parse it if you want to\nsee these work in the way you want, because both in your example and in\nthe often asked-for \"relative to cwd\" example, what you are *asking for*\nis not just an object name, but you are using the mechanism that is meant\nto be used for one.\n\nI personally think reusing the \"object name\" syntax for either of the\nabove usages is a mistake, though.  If HEAD:$submodule_path is a notation\nfor naming an object (which happens to resolve to a commit) and HEAD:git.txt\nis a notation for naming a blob object that is found at the top level of\nthe tree-ish that can be called HEAD, they should retain the same meaning\nthroughout the system and \"git show\" shouldn't be messing with the\nsemantics of the notation.\n"}]}