{"thread":{"id":"60198","subject":"[PATCH] show doc: redirect user to git log manual instead of git diff-tree","startedAt":"2023-09-05T15:59:58Z","lastAt":"2023-09-20T15:52:38Z","messageCount":6,"participants":["Han Young","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"481384","messageId":"20230905121219.69762-1-hanyang.tony@bytedance.com","threadId":"60198","inReplyTo":null,"subject":"[PATCH] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2023-09-05T12:12:19Z","receivedAt":"2023-09-05T15:59:58Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"While git show accepts options that apply to the git diff-tree command,\nsome options do not make sense in the context of git show.\nThe options of git show are handled using the machinery of git log.\nThe git log manual page is a better place to look into than git diff-tree\nfor options that are not in the git show manual page.\n\nSigned-off-by: Han Young <hanyang.tony@bytedance.com>\n---\n Documentation/git-show.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 2b1bc7288d..13f63f5210 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -26,7 +26,7 @@ with --name-only).\n \n For plain blobs, it shows the plain contents.\n \n-The command takes options applicable to the 'git diff-tree' command to\n+The command takes options applicable to the 'git log' command to\n control how the changes the commit introduces are shown.\n \n This manual page describes only the most frequently used options.\n-- \n2.40.0\n\n"},{"id":"481421","messageId":"xmqq7cp4p5gd.fsf@gitster.g","threadId":"60198","inReplyTo":"20230905121219.69762-1-hanyang.tony@bytedance.com","subject":"Re: [PATCH] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-09-05T23:26:26Z","receivedAt":"2023-09-05T23:26:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han Young <hanyang.tony@bytedance.com> writes:\n\n> While git show accepts options that apply to the git diff-tree command,\n> some options do not make sense in the context of git show.\n\nWow, \"diff-tree\" is a bit too arcane, I would agree.\n\nStrictly speaking, \"options to control how the changes are shown\"\nare options that are meant for \"diff\" command (e.g. \"--stat\", \"-w\"),\nbut \"log\" understands some of the \"diff\" command options, the\nupdated text is *not* incorrect.\n\nBecause \"show\" is about displaying individual commits and not range,\nsome options that are meant for the \"log\" command (e.g.\n\"--first-parent\", \"--no-merges\") do not make much sense.  So\n\n    Some options that `git log` command understands can be used to\n    control how the changes the commit introduces are shown.\n\nor something like that, perhaps?  I dunno.\n\n> -The command takes options applicable to the 'git diff-tree' command to\n> +The command takes options applicable to the 'git log' command to\n>  control how the changes the commit introduces are shown.\n>  \n>  This manual page describes only the most frequently used options.\n"},{"id":"481428","messageId":"CAG1j3zFYbeXokd9kwN06RG7Wih_WsLVBf6jSi-JKtUpa=i4QJg@mail.gmail.com","threadId":"60198","inReplyTo":"xmqq7cp4p5gd.fsf@gitster.g","subject":"Re: [PATCH] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2023-09-06T06:09:58Z","receivedAt":"2023-09-06T06:10:03Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"> Strictly speaking, \"options to control how the changes are shown\"\n> are options that are meant for \"diff\" command (e.g. \"--stat\", \"-w\"),\n> but \"log\" understands some of the \"diff\" command options, the\n> updated text is *not* incorrect.\n\nOn a closer look, the manual page of git show does lists\nall the \"diff\" options by including diff-options.txt.\nThe options omitted are revision parsing related.\nPerhaps we remove the line\n\n> The command takes options applicable to the git diff-tree command to\n> control how the changes the commit introduces are shown.\n\nAnd rephrase the line\n\n> This manual page describes only the most frequently used options.\n\nto\n\n>  This manual page describes only the most frequently used options.\n> Some options that `git rev-list` command understands can be used to\n> control how commits are shown.\n"},{"id":"481445","messageId":"xmqqbkefnrgu.fsf@gitster.g","threadId":"60198","inReplyTo":"CAG1j3zFYbeXokd9kwN06RG7Wih_WsLVBf6jSi-JKtUpa=i4QJg@mail.gmail.com","subject":"Re: [PATCH] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-09-06T17:26:09Z","receivedAt":"2023-09-06T17:26:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han Young <hanyang.tony@bytedance.com> writes:\n\n>> Strictly speaking, \"options to control how the changes are shown\"\n>> are options that are meant for \"diff\" command (e.g. \"--stat\", \"-w\"),\n>> but \"log\" understands some of the \"diff\" command options, the\n>> updated text is *not* incorrect.\n>\n> On a closer look, the manual page of git show does lists\n> all the \"diff\" options by including diff-options.txt.\n> The options omitted are revision parsing related.\n\nThe primary difference between \"log\" and \"show\" is that the latter\nis not about walking a range of commits.  Both grok \"diff\" related\noptions that control how the changes introduced by each commit are\nshown equally well.  But in the context of \"show\", options that\ncontrol revision traversal (i.e. which commits are chosen to be\nshown and in what order) do not make much sense.\n\nSo ...\n\n> Perhaps we remove the line\n>\n>> The command takes options applicable to the git diff-tree command to\n>> control how the changes the commit introduces are shown.\n>\n> And rephrase the line\n>\n>> This manual page describes only the most frequently used options.\n>\n> to\n>\n>>  This manual page describes only the most frequently used options.\n>> Some options that `git rev-list` command understands can be used to\n>> control how commits are shown.\n\n... I do not find the above an improvement.\n\nPerhaps we should start with just \"diff-tree\" -> \"log\" and doing no\nother damage to the existing text.  That will give us some baseline\nthat is a strict improvement.\n\nThanks.\n\n"},{"id":"482064","messageId":"20230920132731.1259-1-hanyang.tony@bytedance.com","threadId":"60198","inReplyTo":"20230905121219.69762-1-hanyang.tony@bytedance.com","subject":"[PATCH v2] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2023-09-20T13:27:31Z","receivedAt":"2023-09-20T13:27:48Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"While git show accepts options that apply to the git diff-tree command,\nsome options do not make sense in the context of git show.\nThe options of git show are handled using the machinery of git log.\nThe git log manual page is a better place to look into than git diff-tree\nfor options that are not in the git show manual page.\n\nSigned-off-by: Han Young <hanyang.tony@bytedance.com>\n---\nChanges since v1:\n* change wording to clarify not all options of `git log` are meant for `git show`\n\n Documentation/git-show.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\nindex 2b1bc7288d..fc46b3687b 100644\n--- a/Documentation/git-show.txt\n+++ b/Documentation/git-show.txt\n@@ -26,7 +26,7 @@ with --name-only).\n \n For plain blobs, it shows the plain contents.\n \n-The command takes options applicable to the 'git diff-tree' command to\n+Some options that 'git log' command understands can be used to\n control how the changes the commit introduces are shown.\n \n This manual page describes only the most frequently used options.\n-- \n2.42.0\n\n"},{"id":"482077","messageId":"xmqqpm2calkx.fsf@gitster.g","threadId":"60198","inReplyTo":"20230920132731.1259-1-hanyang.tony@bytedance.com","subject":"Re: [PATCH v2] show doc: redirect user to git log manual instead of git diff-tree","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-09-20T15:52:30Z","receivedAt":"2023-09-20T15:52:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Han Young <hanyang.tony@bytedance.com> writes:\n\n> While git show accepts options that apply to the git diff-tree command,\n> some options do not make sense in the context of git show.\n> The options of git show are handled using the machinery of git log.\n> The git log manual page is a better place to look into than git diff-tree\n> for options that are not in the git show manual page.\n>\n> Signed-off-by: Han Young <hanyang.tony@bytedance.com>\n> ---\n> Changes since v1:\n> * change wording to clarify not all options of `git log` are meant for `git show`\n\nNice.  Thank you very much for not forgetting this topic.\n\n\n\n>  Documentation/git-show.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt\n> index 2b1bc7288d..fc46b3687b 100644\n> --- a/Documentation/git-show.txt\n> +++ b/Documentation/git-show.txt\n> @@ -26,7 +26,7 @@ with --name-only).\n>  \n>  For plain blobs, it shows the plain contents.\n>  \n> -The command takes options applicable to the 'git diff-tree' command to\n> +Some options that 'git log' command understands can be used to\n>  control how the changes the commit introduces are shown.\n>  \n>  This manual page describes only the most frequently used options.\n"}]}