{"thread":{"id":"58036","subject":"[PATCH] rev-parse: documentation adjustment - mention remote tracking with @{u}","startedAt":"2022-06-20T04:01:20Z","lastAt":"2022-06-23T05:12:01Z","messageCount":4,"participants":["Tao Klerks via GitGitGadget","Junio C Hamano","Tao Klerks"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"457540","messageId":"pull.1265.git.1655697671724.gitgitgadget@gmail.com","threadId":"58036","inReplyTo":null,"subject":"[PATCH] rev-parse: documentation adjustment - mention remote tracking with @{u}","fromName":"Tao Klerks via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-06-20T04:01:11Z","receivedAt":"2022-06-20T04:01:20Z","isPatch":true,"sender":{"key":"tao@klerks.biz","avatar":"https://avatars.githubusercontent.com/u/531704?v=4"},"body":"From: Tao Klerks <tao@klerks.biz>\n\nThe documentation explained the conversion from remote branch path to\nlocal tracking ref path for @{push}, but not for @{upstream}.\n\nAdd the note to @{upstream}, and reference it in @{push} to avoid undue\nrepetition.\n\nSigned-off-by: Tao Klerks <tao@klerks.biz>\n---\n    rev-parse: documentation adjustment - mention remote tracking with @{u}\n    \n    Small clarification in the doc for git rev-parse.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1265%2FTaoK%2Ftao-upstreak-doc-fix-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1265/TaoK/tao-upstreak-doc-fix-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1265\n\n Documentation/revisions.txt | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)\n\ndiff --git a/Documentation/revisions.txt b/Documentation/revisions.txt\nindex f5f17b65a12..33809036f04 100644\n--- a/Documentation/revisions.txt\n+++ b/Documentation/revisions.txt\n@@ -97,18 +97,19 @@ some output processing may assume ref names in UTF-8.\n \n '[<branchname>]@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n   The suffix '@\\{upstream\\}' to a branchname (short form '<branchname>@\\{u\\}')\n-  refers to the branch that the branch specified by branchname is set to build on\n-  top of (configured with `branch.<name>.remote` and\n-  `branch.<name>.merge`).  A missing branchname defaults to the\n-  current one. These suffixes are also accepted when spelled in uppercase, and\n-  they mean the same thing no matter the case.\n+  refers to the remote branch that the branch specified by branchname\n+  is set to build on top of (configured with `branch.<name>.remote` and\n+  `branch.<name>.merge`). As `branch.<name>.merge` is the branch path on the\n+  remote, it is first converted to a local tracking branch (i.e., something in\n+  `refs/remotes/`). A missing branchname defaults to the current one. These\n+  suffixes are also accepted when spelled in uppercase, and they mean the same\n+  thing no matter the case.\n \n '[<branchname>]@\\{push\\}', e.g. 'master@\\{push\\}', '@\\{push\\}'::\n   The suffix '@\\{push}' reports the branch \"where we would push to\" if\n   `git push` were run while `branchname` was checked out (or the current\n-  `HEAD` if no branchname is specified). Since our push destination is\n-  in a remote repository, of course, we report the local tracking branch\n-  that corresponds to that branch (i.e., something in `refs/remotes/`).\n+  `HEAD` if no branchname is specified). Like for '@\\{upstream\\}', we report\n+  the local tracking branch that corresponds to that remote branch.\n +\n Here's an example to make it more clear:\n +\n\nbase-commit: 5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44\n-- \ngitgitgadget\n"},{"id":"457627","messageId":"xmqqbkumhtur.fsf@gitster.g","threadId":"58036","inReplyTo":"pull.1265.git.1655697671724.gitgitgadget@gmail.com","subject":"Re: [PATCH] rev-parse: documentation adjustment - mention remote tracking with @{u}","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-06-21T16:19:40Z","receivedAt":"2022-06-21T16:19:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Tao Klerks via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n>  '[<branchname>]@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n>    The suffix '@\\{upstream\\}' to a branchname (short form '<branchname>@\\{u\\}')\n> -  refers to the branch that the branch specified by branchname is set to build on\n> -  top of (configured with `branch.<name>.remote` and\n> -  `branch.<name>.merge`).  A missing branchname defaults to the\n> -  current one. These suffixes are also accepted when spelled in uppercase, and\n> -  they mean the same thing no matter the case.\n> +  refers to the remote branch that the branch specified by branchname\n> +  is set to build on top of (configured with `branch.<name>.remote` and\n> +  `branch.<name>.merge`).\n\nLet's refrain from inventing confusing new phrases that are not\ndefined in \"git help glossary\".\n\nWhat is a \"remote branch\"?  I think this is better left as \"the\nbranch\", to avoid confusion with remote-tracking branch we keep\nlocally.  I think a version with a slight tweak, e.g.\n\n        ... refers to the name of the branch (configured with\n        `branch.<name>.merge`) at the remote (configured with\n        `branch.<name>.remote`) that the branch is set to build on\n        top of.\n\nwould be OK, though.\n\n> ... As `branch.<name>.merge` is the branch path on the\n> +  remote, it is first converted to a local tracking branch (i.e., something in\n> +  `refs/remotes/`).\n\nLet's correct it to \"remote-tracking branch\".\n\nBut more importantly, the order of explanation feels a bit\nbackwards. Something like...\n\n    A branch B may be set up to build on top of a branch X\n    (configured with `branch.<name>.merge`) at a remote R\n    (configured with `branch.<name>.remote`).  B@{u} refers to the\n    remote-tracking branch for the branch X taken from remote R,\n    typically found at `refs/remotes/R/X`.\n\n... to cover both of the above, perhaps, may flow more naturally?\n\n> ... A missing branchname defaults to the current one. These\n> +  suffixes are also accepted when spelled in uppercase, and they mean the same\n> +  thing no matter the case.\n\n>  '[<branchname>]@\\{push\\}', e.g. 'master@\\{push\\}', '@\\{push\\}'::\n>    The suffix '@\\{push}' reports the branch \"where we would push to\" if\n>    `git push` were run while `branchname` was checked out (or the current\n> -  `HEAD` if no branchname is specified). Since our push destination is\n> -  in a remote repository, of course, we report the local tracking branch\n> -  that corresponds to that branch (i.e., something in `refs/remotes/`).\n> +  `HEAD` if no branchname is specified). Like for '@\\{upstream\\}', we report\n> +  the local tracking branch that corresponds to that remote branch.\n>  +\n>  Here's an example to make it more clear:\n>  +\n>\n> base-commit: 5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44\n"},{"id":"457762","messageId":"CAPMMpojn3BfwJJ_CqtM=PXaXvErV11ZGcopmGdbiKMDymZ=DVA@mail.gmail.com","threadId":"58036","inReplyTo":"xmqqbkumhtur.fsf@gitster.g","subject":"Re: [PATCH] rev-parse: documentation adjustment - mention remote tracking with @{u}","fromName":"Tao Klerks","fromEmail":"tao@klerks.biz","sentAt":"2022-06-23T04:37:13Z","receivedAt":"2022-06-23T04:47:52Z","isPatch":true,"sender":{"key":"tao@klerks.biz","avatar":"https://avatars.githubusercontent.com/u/531704?v=4"},"body":"On Tue, Jun 21, 2022 at 6:19 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Tao Klerks via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > ... As `branch.<name>.merge` is the branch path on the\n> > +  remote, it is first converted to a local tracking branch (i.e., something in\n> > +  `refs/remotes/`).\n>\n> Let's correct it to \"remote-tracking branch\".\n>\n> But more importantly, the order of explanation feels a bit\n> backwards. Something like...\n>\n>     A branch B may be set up to build on top of a branch X\n>     (configured with `branch.<name>.merge`) at a remote R\n>     (configured with `branch.<name>.remote`).  B@{u} refers to the\n>     remote-tracking branch for the branch X taken from remote R,\n>     typically found at `refs/remotes/R/X`.\n>\n> ... to cover both of the above, perhaps, may flow more naturally?\n>\n\nLooks great, thanks! I feel like a bit of a fraud signing my name to\nit now, but the important thing is that's a much better improvement\nthan I proposed. Patch v2 coming.\n"},{"id":"457763","messageId":"pull.1265.v2.git.1655960512385.gitgitgadget@gmail.com","threadId":"58036","inReplyTo":"pull.1265.git.1655697671724.gitgitgadget@gmail.com","subject":"[PATCH v2] rev-parse: documentation adjustment - mention remote tracking with @{u}","fromName":"Tao Klerks via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-06-23T05:01:52Z","receivedAt":"2022-06-23T05:12:01Z","isPatch":true,"sender":{"key":"tao@klerks.biz","avatar":"https://avatars.githubusercontent.com/u/531704?v=4"},"body":"From: Tao Klerks <tao@klerks.biz>\n\nThe documentation explained the conversion from remote branch path to\nlocal tracking ref path for @{push}, but not for @{upstream}.\n\nAdd the explanation to @{upstream}, and reference it in @{push} to avoid\nundue repetition.\n\nSigned-off-by: Tao Klerks <tao@klerks.biz>\n---\n    rev-parse: documentation adjustment - mention remote tracking with @{u}\n    \n    Small clarification in the doc for git rev-parse.\n    \n    Changes in V2:\n    \n     * Applied Junio's proposed simplification\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1265%2FTaoK%2Ftao-upstreak-doc-fix-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1265/TaoK/tao-upstreak-doc-fix-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/1265\n\nRange-diff vs v1:\n\n 1:  58d2735d752 ! 1:  9e47e12e9cb rev-parse: documentation adjustment - mention remote tracking with @{u}\n     @@ Commit message\n          The documentation explained the conversion from remote branch path to\n          local tracking ref path for @{push}, but not for @{upstream}.\n      \n     -    Add the note to @{upstream}, and reference it in @{push} to avoid undue\n     -    repetition.\n     +    Add the explanation to @{upstream}, and reference it in @{push} to avoid\n     +    undue repetition.\n      \n          Signed-off-by: Tao Klerks <tao@klerks.biz>\n      \n       ## Documentation/revisions.txt ##\n      @@ Documentation/revisions.txt: some output processing may assume ref names in UTF-8.\n     +   before the current one.\n       \n       '[<branchname>]@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n     -   The suffix '@\\{upstream\\}' to a branchname (short form '<branchname>@\\{u\\}')\n     +-  The suffix '@\\{upstream\\}' to a branchname (short form '<branchname>@\\{u\\}')\n      -  refers to the branch that the branch specified by branchname is set to build on\n      -  top of (configured with `branch.<name>.remote` and\n      -  `branch.<name>.merge`).  A missing branchname defaults to the\n      -  current one. These suffixes are also accepted when spelled in uppercase, and\n      -  they mean the same thing no matter the case.\n     -+  refers to the remote branch that the branch specified by branchname\n     -+  is set to build on top of (configured with `branch.<name>.remote` and\n     -+  `branch.<name>.merge`). As `branch.<name>.merge` is the branch path on the\n     -+  remote, it is first converted to a local tracking branch (i.e., something in\n     -+  `refs/remotes/`). A missing branchname defaults to the current one. These\n     -+  suffixes are also accepted when spelled in uppercase, and they mean the same\n     -+  thing no matter the case.\n     ++  A branch B may be set up to build on top of a branch X (configured with\n     ++  `branch.<name>.merge`) at a remote R (configured with\n     ++  `branch.<name>.remote`). B@{u} refers to the remote-tracking branch for\n     ++  the branch X taken from remote R, typically found at `refs/remotes/R/X`.\n       \n       '[<branchname>]@\\{push\\}', e.g. 'master@\\{push\\}', '@\\{push\\}'::\n         The suffix '@\\{push}' reports the branch \"where we would push to\" if\n     @@ Documentation/revisions.txt: some output processing may assume ref names in UTF-\n      -  in a remote repository, of course, we report the local tracking branch\n      -  that corresponds to that branch (i.e., something in `refs/remotes/`).\n      +  `HEAD` if no branchname is specified). Like for '@\\{upstream\\}', we report\n     -+  the local tracking branch that corresponds to that remote branch.\n     ++  the remote-tracking branch that corresponds to that branch at the remote.\n       +\n       Here's an example to make it more clear:\n       +\n\n\n Documentation/revisions.txt | 15 ++++++---------\n 1 file changed, 6 insertions(+), 9 deletions(-)\n\ndiff --git a/Documentation/revisions.txt b/Documentation/revisions.txt\nindex f5f17b65a12..7fcfbcbac7e 100644\n--- a/Documentation/revisions.txt\n+++ b/Documentation/revisions.txt\n@@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8.\n   before the current one.\n \n '[<branchname>]@\\{upstream\\}', e.g. 'master@\\{upstream\\}', '@\\{u\\}'::\n-  The suffix '@\\{upstream\\}' to a branchname (short form '<branchname>@\\{u\\}')\n-  refers to the branch that the branch specified by branchname is set to build on\n-  top of (configured with `branch.<name>.remote` and\n-  `branch.<name>.merge`).  A missing branchname defaults to the\n-  current one. These suffixes are also accepted when spelled in uppercase, and\n-  they mean the same thing no matter the case.\n+  A branch B may be set up to build on top of a branch X (configured with\n+  `branch.<name>.merge`) at a remote R (configured with\n+  `branch.<name>.remote`). B@{u} refers to the remote-tracking branch for\n+  the branch X taken from remote R, typically found at `refs/remotes/R/X`.\n \n '[<branchname>]@\\{push\\}', e.g. 'master@\\{push\\}', '@\\{push\\}'::\n   The suffix '@\\{push}' reports the branch \"where we would push to\" if\n   `git push` were run while `branchname` was checked out (or the current\n-  `HEAD` if no branchname is specified). Since our push destination is\n-  in a remote repository, of course, we report the local tracking branch\n-  that corresponds to that branch (i.e., something in `refs/remotes/`).\n+  `HEAD` if no branchname is specified). Like for '@\\{upstream\\}', we report\n+  the remote-tracking branch that corresponds to that branch at the remote.\n +\n Here's an example to make it more clear:\n +\n\nbase-commit: 5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44\n-- \ngitgitgadget\n"}]}