Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Ivan Baluta <ivanbaluta.dev@gmail.com>
Subject: Re: [PATCH] doc: clarify push.default=simple in triangular workflows
Date: Fri, 22 May 2026 17:49:24 +0900	[thread overview]
Message-ID: <xmqq8q9bu8vf.fsf@gitster.g> (raw)
In-Reply-To: <pull.2115.git.1779433093971.gitgitgadget@gmail.com> (Ivan Baluta via GitGitGadget's message of "Fri, 22 May 2026 06:58:13 +0000")

"Ivan Baluta via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: ivanbaluta <ivanbaluta.dev@gmail.com>

Just noticing, but don't you want to spell your name just like you
spell it in your e-mails?  I.e., 

    From: Ivan Baluta <ivanbaluta.dev@gmail.com>

Use the same name for your sign-off below.

> The documentation for 'simple' push mode currently focuses on the
> centralized workflow. However, the implementation in builtin/push.c
> falls back to 'current' behavior when pushing to a remote different
> from the upstream (a triangular workflow).

It is not just implementation, but that is how it was designed to
do.

Whether centralized or triangular, "simple" works as a restricted
form as "current", with the same restriction.  That is, both
"current" and "simple" push out only the current branch to a single
destination that is configured, and "simple" insists that the
destination has the same name as the local branch.

So I am not sure if this three-line patch adds much value.

I agree that it _is_ confusing that the current text singles out the
centralized workflow when describing "simple".  But the remedy may
not be to add "what happens in triangular, then?", but it may be to
clarify that the need to configure the push destination whether your
push destination is the same as or different from your upstream, no?

Something along this line, perhaps?

    `simple`;;
    push the current branch with the same name on the remote.
    +
    This mode requires that the remote repository to be pushed to is
    known.  When pushing back to the same remote you pull from, the
    current branch must also have an upstream tracking branch with the
    same name.
    +
    This mode is the default since Git 2.0, and is the safest option
    suited for beginners.

That way, the description would be more self standing and the
readers hopefully do not have to refer to another mode (`current`)
to understand what happens, no?

      reply	other threads:[~2026-05-22  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  6:58 [PATCH] doc: clarify push.default=simple in triangular workflows Ivan Baluta via GitGitGadget
2026-05-22  8:49 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8q9bu8vf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=ivanbaluta.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox