{"thread":{"id":"65673","subject":"[PATCH] doc: clarify push.default=simple in triangular workflows","startedAt":"2026-05-22T06:58:16Z","lastAt":"2026-06-01T23:33:13Z","messageCount":5,"participants":["Ivan Baluta via GitGitGadget","Junio C Hamano","Иван Балута"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"543894","messageId":"pull.2115.git.1779433093971.gitgitgadget@gmail.com","threadId":"65673","inReplyTo":null,"subject":"[PATCH] doc: clarify push.default=simple in triangular workflows","fromName":"Ivan Baluta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-05-22T06:58:13Z","receivedAt":"2026-05-22T06:58:16Z","isPatch":true,"body":"From: ivanbaluta <ivanbaluta.dev@gmail.com>\n\nThe documentation for 'simple' push mode currently focuses on the\ncentralized workflow. However, the implementation in builtin/push.c\nfalls back to 'current' behavior when pushing to a remote different\nfrom the upstream (a triangular workflow).\n\nClarify this in the manual to align the documentation with the\nlong-standing implementation and prevent user confusion.\n\nSigned-off-by: ivanbaluta <ivanbaluta.dev@gmail.com>\n---\n    doc: clarify push.default=simple in triangular workflows\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2115%2Fivanbaluta%2Fdoc-push-simple-triangular-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2115\n\n Documentation/config/push.adoc | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc\nindex d9112b2260..979e40c3a4 100644\n--- a/Documentation/config/push.adoc\n+++ b/Documentation/config/push.adoc\n@@ -45,6 +45,9 @@ If you are working on a centralized workflow (pushing to the same repository you\n pull from, which is typically `origin`), then you need to configure an upstream\n branch with the same name.\n +\n+In a triangular workflow (pushing to a remote different from the upstream),\n+`simple` behaves like `current`.\n++\n This mode is the default since Git 2.0, and is the safest option suited for\n beginners.\n \n\nbase-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08\n-- \ngitgitgadget\n"},{"id":"543903","messageId":"xmqq8q9bu8vf.fsf@gitster.g","threadId":"65673","inReplyTo":"pull.2115.git.1779433093971.gitgitgadget@gmail.com","subject":"Re: [PATCH] doc: clarify push.default=simple in triangular workflows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-05-22T08:49:24Z","receivedAt":"2026-05-22T08:49:27Z","isPatch":true,"body":"\"Ivan Baluta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: ivanbaluta <ivanbaluta.dev@gmail.com>\n\nJust noticing, but don't you want to spell your name just like you\nspell it in your e-mails?  I.e., \n\n    From: Ivan Baluta <ivanbaluta.dev@gmail.com>\n\nUse the same name for your sign-off below.\n\n> The documentation for 'simple' push mode currently focuses on the\n> centralized workflow. However, the implementation in builtin/push.c\n> falls back to 'current' behavior when pushing to a remote different\n> from the upstream (a triangular workflow).\n\nIt is not just implementation, but that is how it was designed to\ndo.\n\nWhether centralized or triangular, \"simple\" works as a restricted\nform as \"current\", with the same restriction.  That is, both\n\"current\" and \"simple\" push out only the current branch to a single\ndestination that is configured, and \"simple\" insists that the\ndestination has the same name as the local branch.\n\nSo I am not sure if this three-line patch adds much value.\n\nI agree that it _is_ confusing that the current text singles out the\ncentralized workflow when describing \"simple\".  But the remedy may\nnot be to add \"what happens in triangular, then?\", but it may be to\nclarify that the need to configure the push destination whether your\npush destination is the same as or different from your upstream, no?\n\nSomething along this line, perhaps?\n\n    `simple`;;\n    push the current branch with the same name on the remote.\n    +\n    This mode requires that the remote repository to be pushed to is\n    known.  When pushing back to the same remote you pull from, the\n    current branch must also have an upstream tracking branch with the\n    same name.\n    +\n    This mode is the default since Git 2.0, and is the safest option\n    suited for beginners.\n\nThat way, the description would be more self standing and the\nreaders hopefully do not have to refer to another mode (`current`)\nto understand what happens, no?\n"},{"id":"544059","messageId":"CANvyLnr3+tTYb9zxCL03oaDGiyzNCW-+==y_avcMfAwYCkY9yg@mail.gmail.com","threadId":"65673","inReplyTo":"xmqq8q9bu8vf.fsf@gitster.g","subject":"Re: [PATCH] doc: clarify push.default=simple in triangular workflows","fromName":"Иван Балута","fromEmail":"ivanbaluta.dev@gmail.com","sentAt":"2026-05-25T10:32:52Z","receivedAt":"2026-05-25T10:33:04Z","isPatch":true,"body":"On Fri, May 22, 2026 at 3:49 PM Junio C Hamano <gitster@pobox.com> wrote:\n>\n> \"Ivan Baluta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>\n> > From: ivanbaluta <ivanbaluta.dev@gmail.com>\n>\n> Just noticing, but don't you want to spell your name just like you\n> spell it in your e-mails?  I.e.,\n>\n>     From: Ivan Baluta <ivanbaluta.dev@gmail.com>\n>\n> Use the same name for your sign-off below.\n>\n> > The documentation for 'simple' push mode currently focuses on the\n> > centralized workflow. However, the implementation in builtin/push.c\n> > falls back to 'current' behavior when pushing to a remote different\n> > from the upstream (a triangular workflow).\n>\n> It is not just implementation, but that is how it was designed to\n> do.\n>\n> Whether centralized or triangular, \"simple\" works as a restricted\n> form as \"current\", with the same restriction.  That is, both\n> \"current\" and \"simple\" push out only the current branch to a single\n> destination that is configured, and \"simple\" insists that the\n> destination has the same name as the local branch.\n>\n> So I am not sure if this three-line patch adds much value.\n>\n> I agree that it _is_ confusing that the current text singles out the\n> centralized workflow when describing \"simple\".  But the remedy may\n> not be to add \"what happens in triangular, then?\", but it may be to\n> clarify that the need to configure the push destination whether your\n> push destination is the same as or different from your upstream, no?\n>\n> Something along this line, perhaps?\n>\n>     `simple`;;\n>     push the current branch with the same name on the remote.\n>     +\n>     This mode requires that the remote repository to be pushed to is\n>     known.  When pushing back to the same remote you pull from, the\n>     current branch must also have an upstream tracking branch with the\n>     same name.\n>     +\n>     This mode is the default since Git 2.0, and is the safest option\n>     suited for beginners.\n>\n> That way, the description would be more self standing and the\n> readers hopefully do not have to refer to another mode (`current`)\n> to understand what happens, no?\n\n\nThanks, I have corrected my name formatting.\n\nI completely agree with your feedback. Your suggested phrasing is indeed\nmuch clearer and prevents the reader from having to cross-reference the\n\"current\" mode to understand \"simple\".\n\nI will submit v2 shortly with your suggested text.\n"},{"id":"544091","messageId":"pull.2115.v2.git.1779767888508.gitgitgadget@gmail.com","threadId":"65673","inReplyTo":"pull.2115.git.1779433093971.gitgitgadget@gmail.com","subject":"[PATCH v2] doc: clarify push.default=simple behavior","fromName":"Ivan Baluta via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-05-26T03:58:07Z","receivedAt":"2026-05-26T03:58:10Z","isPatch":true,"body":"From: Ivan Baluta <ivanbaluta.dev@gmail.com>\n\nThe documentation for the 'simple' push mode currently singles out\nthe centralized workflow, which can cause confusion about its\nbehavior in other scenarios, such as triangular workflows.\n\nClarify that 'simple' always pushes the current branch to a branch\nof the same name, but only enforces the strict upstream tracking\nrequirement when pushing back to the same remote being pulled from.\n\nSuggested-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: Ivan Baluta <ivanbaluta.dev@gmail.com>\n---\n    doc: clarify push.default=simple in triangular workflows\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2115%2Fivanbaluta%2Fdoc-push-simple-triangular-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/2115\n\nRange-diff vs v1:\n\n 1:  37ff842622 ! 1:  3deb7f5b0c doc: clarify push.default=simple in triangular workflows\n     @@\n       ## Metadata ##\n     -Author: ivanbaluta <ivanbaluta.dev@gmail.com>\n     +Author: Ivan Baluta <ivanbaluta.dev@gmail.com>\n      \n       ## Commit message ##\n     -    doc: clarify push.default=simple in triangular workflows\n     +    doc: clarify push.default=simple behavior\n      \n     -    The documentation for 'simple' push mode currently focuses on the\n     -    centralized workflow. However, the implementation in builtin/push.c\n     -    falls back to 'current' behavior when pushing to a remote different\n     -    from the upstream (a triangular workflow).\n     +    The documentation for the 'simple' push mode currently singles out\n     +    the centralized workflow, which can cause confusion about its\n     +    behavior in other scenarios, such as triangular workflows.\n      \n     -    Clarify this in the manual to align the documentation with the\n     -    long-standing implementation and prevent user confusion.\n     +    Clarify that 'simple' always pushes the current branch to a branch\n     +    of the same name, but only enforces the strict upstream tracking\n     +    requirement when pushing back to the same remote being pulled from.\n      \n     -    Signed-off-by: ivanbaluta <ivanbaluta.dev@gmail.com>\n     +    Suggested-by: Junio C Hamano <gitster@pobox.com>\n     +    Signed-off-by: Ivan Baluta <ivanbaluta.dev@gmail.com>\n      \n       ## Documentation/config/push.adoc ##\n     -@@ Documentation/config/push.adoc: If you are working on a centralized workflow (pushing to the same repository you\n     - pull from, which is typically `origin`), then you need to configure an upstream\n     - branch with the same name.\n     +@@ Documentation/config/push.adoc: this is a deprecated synonym for `upstream`.\n     + `simple`;;\n     + push the current branch with the same name on the remote.\n     + +\n     +-If you are working on a centralized workflow (pushing to the same repository you\n     +-pull from, which is typically `origin`), then you need to configure an upstream\n     +-branch with the same name.\n     ++This mode requires that the remote repository to be pushed to is\n     ++known.  When pushing back to the same remote you pull from, the\n     ++current branch must also have an upstream tracking branch with the\n     ++same name.\n       +\n     -+In a triangular workflow (pushing to a remote different from the upstream),\n     -+`simple` behaves like `current`.\n     -++\n       This mode is the default since Git 2.0, and is the safest option suited for\n       beginners.\n     - \n\n\n Documentation/config/push.adoc | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc\nindex d9112b2260..28132eedfe 100644\n--- a/Documentation/config/push.adoc\n+++ b/Documentation/config/push.adoc\n@@ -41,9 +41,10 @@ this is a deprecated synonym for `upstream`.\n `simple`;;\n push the current branch with the same name on the remote.\n +\n-If you are working on a centralized workflow (pushing to the same repository you\n-pull from, which is typically `origin`), then you need to configure an upstream\n-branch with the same name.\n+This mode requires that the remote repository to be pushed to is\n+known.  When pushing back to the same remote you pull from, the\n+current branch must also have an upstream tracking branch with the\n+same name.\n +\n This mode is the default since Git 2.0, and is the safest option suited for\n beginners.\n\nbase-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08\n-- \ngitgitgadget\n"},{"id":"544443","messageId":"xmqqjysh25vt.fsf@gitster.g","threadId":"65673","inReplyTo":"pull.2115.v2.git.1779767888508.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] doc: clarify push.default=simple behavior","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-01T23:33:10Z","receivedAt":"2026-06-01T23:33:13Z","isPatch":true,"body":"\"Ivan Baluta via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Ivan Baluta <ivanbaluta.dev@gmail.com>\n>\n> The documentation for the 'simple' push mode currently singles out\n> the centralized workflow, which can cause confusion about its\n> behavior in other scenarios, such as triangular workflows.\n>\n> Clarify that 'simple' always pushes the current branch to a branch\n> of the same name, but only enforces the strict upstream tracking\n> requirement when pushing back to the same remote being pulled from.\n>\n> Suggested-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: Ivan Baluta <ivanbaluta.dev@gmail.com>\n> ---\n>     doc: clarify push.default=simple in triangular workflows\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2115%2Fivanbaluta%2Fdoc-push-simple-triangular-v2\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v2\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2115\n\nLooking good.  Thanks.\n\n> diff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc\n> index d9112b2260..28132eedfe 100644\n> --- a/Documentation/config/push.adoc\n> +++ b/Documentation/config/push.adoc\n> @@ -41,9 +41,10 @@ this is a deprecated synonym for `upstream`.\n>  `simple`;;\n>  push the current branch with the same name on the remote.\n>  +\n> -If you are working on a centralized workflow (pushing to the same repository you\n> -pull from, which is typically `origin`), then you need to configure an upstream\n> -branch with the same name.\n> +This mode requires that the remote repository to be pushed to is\n> +known.  When pushing back to the same remote you pull from, the\n> +current branch must also have an upstream tracking branch with the\n> +same name.\n>  +\n>  This mode is the default since Git 2.0, and is the safest option suited for\n>  beginners.\n>\n> base-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08\n"}]}