{"thread":{"id":"17638","subject":"[PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","startedAt":"2009-02-07T22:16:11Z","lastAt":"2009-02-08T08:47:36Z","messageCount":5,"participants":["Jari Aalto","Jakub Narebski","Boyd Stephen Smith Jr."],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"103665","messageId":"87zlgxzydw.fsf@jondo.cante.net","threadId":"17638","inReplyTo":null,"subject":"[PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2009-02-07T22:16:11Z","receivedAt":"2009-02-07T22:16:11Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n Documentation/git-show.txt |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 48b612e..2a014cc 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -57,7 +57,11 @@ git show v1.0.0^\\{tree\\}::\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+\t`next`. *Note:* the 'object' path must always be relative to git\n+\tproject root. This wouldn't have worked:\n+\n+\t$ cd Documentation\n+\t$ git show next~10:README\n \n git show master:Makefile master:t/Makefile::\n \tConcatenates the contents of said Makefiles in the head\n-- \n1.5.6.5\n"},{"id":"103669","messageId":"m3mycxvn55.fsf@localhost.localdomain","threadId":"17638","inReplyTo":"87zlgxzydw.fsf@jondo.cante.net","subject":"Re: [PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-02-07T23:31:47Z","receivedAt":"2009-02-07T23:31:47Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Jari Aalto <jari.aalto@cante.net> writes:\n\n> Signed-off-by: Jari Aalto <jari.aalto@cante.net>\n> ---\n>  Documentation/git-show.txt |    6 +++++-\n>  1 files changed, 5 insertions(+), 1 deletions(-)\n> \n> diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\n> index 48b612e..2a014cc 100644\n> --- a/Documentation/git-show.txt\n> +++ b/Documentation/git-show.txt\n> @@ -57,7 +57,11 @@ git show v1.0.0^\\{tree\\}::\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> +\t`next`. *Note:* the 'object' path must always be relative to git\n> +\tproject root. This wouldn't have worked:\n> +\n> +\t$ cd Documentation\n> +\t$ git show next~10:README\n\nActually that is not exactly true.  In the <tree-ish>:<path> the\n'object' path must be always relative to <tree-ish), in this case\nto \"next~10\", which means relative to project root at given commit\n(important in case of subtree merge).\n\nAlthough in practice <tree-ish> is always commit.\n\n>  \n>  git show master:Makefile master:t/Makefile::\n>  \tConcatenates the contents of said Makefiles in the head\n> -- \n> 1.5.6.5\n> \n> \n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"103689","messageId":"200902072259.29121.bss@iguanasuicide.net","threadId":"17638","inReplyTo":"m3mycxvn55.fsf@localhost.localdomain","subject":"Re: [PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","fromName":"Boyd Stephen Smith Jr.","fromEmail":"bss@iguanasuicide.net","sentAt":"2009-02-08T04:59:28Z","receivedAt":"2009-02-08T04:59:28Z","isPatch":true,"sender":{"key":"bss@iguanasuicide.net","avatar":"https://gravatar.com/avatar/84b95eeff194b816c1568b1339e63e4b229825298664a9037b9f1ec713ead1e3?d=mp&s=160"},"body":"On Saturday 07 February 2009 17:31:47 Jakub Narebski wrote:\n> Jari Aalto <jari.aalto@cante.net> writes:\n> > @@ -57,7 +57,11 @@ git show v1.0.0^\\{tree\\}::\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> > +\t`next`. *Note:* the 'object' path must always be relative to git\n> > +\tproject root. This wouldn't have worked:\n> > +\n> > +\t$ cd Documentation\n> > +\t$ git show next~10:README\n>\n> Actually that is not exactly true.  In the <tree-ish>:<path> the\n> 'object' path must be always relative to <tree-ish), in this case\n> to \"next~10\", which means relative to project root at given commit\n> (important in case of subtree merge).\n\nAlso important if one of your commits moves everything into a subdirectory in \npreparation for adding new top-level directories.  Sure, everyone on this list \nalways knows exactly what their project tree should look like from the first \ncommit, but there may be users of git that aren't that sophisticated.  ;)\n\nSo, I think better additional text would simply be:\n*Note:* the path is interpreted relative to the tree-ish.\n\nA example of what not to do is probably not useful in this case.\n-- \nBoyd Stephen Smith Jr.                   ,= ,-_-. =.\nbss@iguanasuicide.net                   ((_/)o o(\\_))\nICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'\nhttp://iguanasuicide.net/                    \\_/\n\n"},{"id":"103697","messageId":"87skmpxt5g.fsf@jondo.cante.net","threadId":"17638","inReplyTo":"200902072259.29121.bss@iguanasuicide.net","subject":"Re: [PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2009-02-08T07:52:11Z","receivedAt":"2009-02-08T07:52:11Z","isPatch":true,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"\"Boyd Stephen Smith Jr.\" <bss@iguanasuicide.net> writes:\n\n> On Saturday 07 February 2009 17:31:47 Jakub Narebski wrote:\n>\n>> Jari Aalto <jari.aalto@cante.net> writes:\n>> > +\t`next`. *Note:* the 'object' path must always be relative to git\n>> > +\tproject root. This wouldn't have worked:\n>> > +\n>> > +\t$ cd Documentation\n>> > +\t$ git show next~10:README\n>>\n>> Actually that is not exactly true.  In the <tree-ish>:<path> the\n>> 'object' path must be always relative to <tree-ish), in this case\n>> to \"next~10\", which means relative to project root at given commit\n>> (important in case of subtree merge).\n>\n> Also important if one of your commits moves everything into a subdirectory in \n> preparation for adding new top-level directories.  Sure, everyone on this list \n> always knows exactly what their project tree should look like from the first \n> commit, but there may be users of git that aren't that sophisticated.  ;)\n>\n> So, I think better additional text would simply be:\n> *Note:* the path is interpreted relative to the tree-ish.\n\nChanged, See below.\n\n> A example of what not to do is probably not useful in this case.\n\nIt is important to give examples. This is a common mistake:\n\n    $ cd todir\n    $ ls file.txt\n    file.txt\n\n    $ git show 8b2de93:file.txt\n\n    fatal: ambiguous argument '8b2de93:file.txt':\n    unknown revision or path not in the working tree.\n\nThe path is in working tree from user's point of view but Git expects\nit from project root. Not intuitive if you're deep/in/the/directory/hierarchy\n\nJari\n\n>From 9de53447e456aaf5ab64f616df76f05888cc0d76 Mon Sep 17 00:00:00 2001\nFrom: Jari Aalto <jari.aalto@cante.net>\nDate: Sun, 8 Feb 2009 09:43:57 +0200\nSubject: [PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.\n\nSigned-off-by: Jari Aalto <jari.aalto@cante.net>\n---\n Documentation/git-show.txt |    8 +++++++-\n 1 files changed, 7 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 48b612e..27f771b 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -57,7 +57,13 @@ git show v1.0.0^\\{tree\\}::\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+\t`next`. *Note:* the path is interpreted relative to the tree-ish.\n+\tA typical mistake is that after changing to a subdirectory from\n+\tproject root, the current' directory's filename is used:\n+\n+\t$ cd Documentation\n+\t$ git show next~10:README\t\t # Error, needs path\n+\t$ git show next~10:Documentation/README  # Ok, relative to tree-ish\n \n git show master:Makefile master:t/Makefile::\n \tConcatenates the contents of said Makefiles in the head\n-- \n1.5.6.5\n"},{"id":"103700","messageId":"200902080247.44151.bss@iguanasuicide.net","threadId":"17638","inReplyTo":"87skmpxt5g.fsf@jondo.cante.net","subject":"Re: [PATCH] git-show.txt: mention that object path must be relative in EXAMPLES.","fromName":"Boyd Stephen Smith Jr.","fromEmail":"bss@iguanasuicide.net","sentAt":"2009-02-08T08:47:36Z","receivedAt":"2009-02-08T08:47:36Z","isPatch":true,"sender":{"key":"bss@iguanasuicide.net","avatar":"https://gravatar.com/avatar/84b95eeff194b816c1568b1339e63e4b229825298664a9037b9f1ec713ead1e3?d=mp&s=160"},"body":"On Sunday 08 February 2009 01:52:11 Jari Aalto wrote:\n> \"Boyd Stephen Smith Jr.\" <bss@iguanasuicide.net> writes:\n> > On Saturday 07 February 2009 17:31:47 Jakub Narebski wrote:\n> >> Jari Aalto <jari.aalto@cante.net> writes:\n> >> > +\t`next`. *Note:* the 'object' path must always be relative to git\n> >> > +\tproject root.\n> >> Actually that is not exactly true.  In the <tree-ish>:<path> the\n> >> 'object' path must be always relative to <tree-ish), in this case\n> >> to \"next~10\", which means relative to project root at given commit\n> >> (important in case of subtree merge).\n> > Also important if one of your commits moves everything into a\n> > subdirectory in preparation for adding new top-level directories.\n> >\n> > So, I think better additional text would simply be:\n> > *Note:* the path is interpreted relative to the tree-ish.\n>\n> Changed, See below.\n\nThanks.\n\n> > A example of what not to do is probably not useful in this case.\n>\n> It is important to give examples. This is a common mistake:\n>\n>     $ cd todir\n>     $ ls file.txt\n>     file.txt\n>\n>     $ git show 8b2de93:file.txt\n>\n>     fatal: ambiguous argument '8b2de93:file.txt':\n>     unknown revision or path not in the working tree.\n\nI agree with both of your statements.  I'm just not sure about the wisdom of \ngiving an example of what *not* to do.  There's a lot more incorrect \ninvocations of git there there are correct invocations.  Perhaps an example \nthat illustrated to the user how the \"unintuitive\" behavior was *useful* would \nbe better.\n\n> The path is in working tree from user's point of view\n\nNo.  At least, not from a right-thinking user's point of view.  The phrase \n\"working tree\" has a very specific meaning in git, it is not \"the current \ndirectory\".\n\n> Not intuitive if you're\n> deep/in/the/directory/hierarchy\n\nI'm not sure \"not intuitive\" is a useful metric.  Different people simply \nexpect different results.  HCI studies are hard; we shouldn't assume we can \nguess their results so easily.\n\nEven with my objections above, I'm still slightly positive toward the patch as \nis.\n-- \nBoyd Stephen Smith Jr.                   ,= ,-_-. =.\nbss@iguanasuicide.net                   ((_/)o o(\\_))\nICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'\nhttp://iguanasuicide.net/                    \\_/\n\n"}]}