{"thread":{"id":"43122","subject":"Re: [PATCH] document the <tree ish> <file> blob reference syntax","startedAt":"2006-10-25T10:42:31Z","lastAt":"2006-10-25T20:13:29Z","messageCount":5,"participants":["Junio C Hamano","Andy Whitcroft","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"297195","messageId":"38fafea491402334df335c486270ebe9@pinky","threadId":"43122","inReplyTo":null,"subject":"[PATCH] document the <tree ish> <file> blob reference syntax","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-10-25T10:42:31Z","receivedAt":"2006-10-25T10:42:31Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"It is possible to specify a specific file within a tree-ish\nsymbolically.  For example you can find the contents of\na specific file in a specific commit as below:\n\n\tgit cat-file -p v1.2.4:git-prune.sh\n\nDocument this syntax in the Symbolic Identifiers section\nof the main git documentation and reference it from\ngit-cat-file's documentation.\n\nSigned-off-by: Andy Whitcroft <apw@shadowen.org>\n---\ndiff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt\nindex 5e9cbf8..9f2138d 100644\n--- a/Documentation/git-cat-file.txt\n+++ b/Documentation/git-cat-file.txt\n@@ -19,7 +19,9 @@ or '-s' is used to find the object size.\n OPTIONS\n -------\n <object>::\n-\tThe sha1 identifier of the object.\n+\tThe sha1 identifier of the object or a symbolic object\n+\treference.  See the Symbolic Identifiers section of the\n+\tmain git manual page.\n \n -t::\n \tInstead of the content, show the object type identified by\n@@ -58,6 +60,18 @@ Otherwise the raw (though uncompressed) \n be returned.\n \n \n+EXAMPLES\n+--------\n+git cat-file -p c5a5d29aaacf753b70e715169cbb7f74f0193e4a::\n+\tPretty print the object directly using an sha1, perhaps\n+\tfrom a git ls-tree output.\n+\n+git cat-file -p v1.2.4:git-prune.sh::\n+\tOutput the file git-prune.sh from the branch or tag v1.2.4.\n+\tNote that where the name is ambigious a heads/ or tags/\n+\tprefix may be used to disambiguate the name.\n+\n+\n Author\n ------\n Written by Linus Torvalds <torvalds@osdl.org>\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 7074e32..e9f99e2 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -565,6 +565,13 @@ HEAD::\n \ta valid head 'name'\n \t(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).\n \n+Some commands will also accept the following extended syntax:\n+\n+<tree-ish>:<file>::\n+\tindicating a specific blob for that file within the tree\n+\tobject specified, which may also be symbolic.  For example\n+\t'v1.2.4:git-prune.sh'.\n+\n \n File/Directory Structure\n"},{"id":"295470","messageId":"7vwt6ob5zc.fsf@assigned-by-dhcp.cox.net","threadId":"43122","inReplyTo":"38fafea491402334df335c486270ebe9@pinky","subject":"Re: [PATCH] document the <tree ish> <file> blob reference syntax","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-25T18:33:27Z","receivedAt":"2006-10-25T18:33:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Whitcroft <apw@shadowen.org> writes:\n\n> It is possible to specify a specific file within a tree-ish\n> symbolically.  For example you can find the contents of\n> a specific file in a specific commit as below:\n>\n> \tgit cat-file -p v1.2.4:git-prune.sh\n\nDidn't we document this elsewhere recently in git-rev-parse?\nHow about this instead?\n\n-- >8 --\n[PATCH] Refer to git-rev-parse:Specifying Revisions from git.txt\n\nThe brief list given in \"Symbolic Identifiers\" section of the\nmain documentation is good enough for overview, but help the\nreader to find a more comrehensive list as needed.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n Documentation/git.txt |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 3af6fc6..b00607e 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -562,6 +562,9 @@ HEAD::\n \ta valid head 'name'\n \t(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).\n \n+For a more complete list of ways to spell object names, see\n+\"SPECIFYING REVISIONS\" section in gitlink:git-rev-parse[1].\n+\n \n File/Directory Structure\n ------------------------\n-- \n1.4.3.2.gc1a4\n\n"},{"id":"295888","messageId":"453FBDAA.50305@shadowen.org","threadId":"43122","inReplyTo":"7vwt6ob5zc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] document the <tree ish> <file> blob reference syntax","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2006-10-25T19:40:26Z","receivedAt":"2006-10-25T19:40:26Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Andy Whitcroft <apw@shadowen.org> writes:\n> \n>> It is possible to specify a specific file within a tree-ish\n>> symbolically.  For example you can find the contents of\n>> a specific file in a specific commit as below:\n>>\n>> \tgit cat-file -p v1.2.4:git-prune.sh\n> \n> Didn't we document this elsewhere recently in git-rev-parse?\n> How about this instead?\n> \n> -- >8 --\n> [PATCH] Refer to git-rev-parse:Specifying Revisions from git.txt\n> \n> The brief list given in \"Symbolic Identifiers\" section of the\n> main documentation is good enough for overview, but help the\n> reader to find a more comrehensive list as needed.\n> \n> Signed-off-by: Junio C Hamano <junkio@cox.net>\n> ---\n>  Documentation/git.txt |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n> \n> diff --git a/Documentation/git.txt b/Documentation/git.txt\n> index 3af6fc6..b00607e 100644\n> --- a/Documentation/git.txt\n> +++ b/Documentation/git.txt\n> @@ -562,6 +562,9 @@ HEAD::\n>  \ta valid head 'name'\n>  \t(i.e. the contents of `$GIT_DIR/refs/heads/<head>`).\n>  \n> +For a more complete list of ways to spell object names, see\n> +\"SPECIFYING REVISIONS\" section in gitlink:git-rev-parse[1].\n> +\n\nThat section seems to have more compresensive descriptions of the\nvarious definitions of commit-ish, but not a tree-ish.  Specifically,\nthere is no mentions of tree-ish:file\n\n"},{"id":"297501","messageId":"ehofuh$sod$1@sea.gmane.org","threadId":"43122","inReplyTo":"7vwt6ob5zc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] document the <tree ish> <file> blob reference syntax","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-25T20:04:05Z","receivedAt":"2006-10-25T20:04:05Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Junio C Hamano wrote:\n\n> Andy Whitcroft <apw@shadowen.org> writes:\n> \n>> It is possible to specify a specific file within a tree-ish\n>> symbolically.  For example you can find the contents of\n>> a specific file in a specific commit as below:\n>>\n>>       git cat-file -p v1.2.4:git-prune.sh\n> \n> Didn't we document this elsewhere recently in git-rev-parse?\n> How about this instead?\n\nRedundancy in documentation is (usually) good idea. Perhaps\nboth?\n\nP.S. \"recently\" as in \"Thu Oct 19 10:04:55 2006 +0700\" in 'master',\ncommit v1.4.3-g6b09c78\n-- \nJakub Narebski\nPoland\n"},{"id":"293879","messageId":"7vy7r4nogm.fsf@assigned-by-dhcp.cox.net","threadId":"43122","inReplyTo":"453FBDAA.50305@shadowen.org","subject":"Re: [PATCH] document the <tree ish> <file> blob reference syntax","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-25T20:13:29Z","receivedAt":"2006-10-25T20:13:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Whitcroft <apw@shadowen.org> writes:\n\n>> +For a more complete list of ways to spell object names, see\n>> +\"SPECIFYING REVISIONS\" section in gitlink:git-rev-parse[1].\n>> +\n>\n> That section seems to have more compresensive descriptions of the\n> various definitions of commit-ish, but not a tree-ish.  Specifically,\n> there is no mentions of tree-ish:file\n\n  164 * A suffix ':' followed by a path; this names the blob or tree\n  165   at the given path in the tree-ish object named by the part\n  166   before the colon.\n\n"}]}