* [PATCH] doc: clarify push.default=simple in triangular workflows
@ 2026-05-22 6:58 Ivan Baluta via GitGitGadget
2026-05-22 8:49 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Baluta via GitGitGadget @ 2026-05-22 6:58 UTC (permalink / raw)
To: git; +Cc: Ivan Baluta, ivanbaluta
From: ivanbaluta <ivanbaluta.dev@gmail.com>
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).
Clarify this in the manual to align the documentation with the
long-standing implementation and prevent user confusion.
Signed-off-by: ivanbaluta <ivanbaluta.dev@gmail.com>
---
doc: clarify push.default=simple in triangular workflows
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2115%2Fivanbaluta%2Fdoc-push-simple-triangular-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2115/ivanbaluta/doc-push-simple-triangular-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2115
Documentation/config/push.adoc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/config/push.adoc b/Documentation/config/push.adoc
index d9112b2260..979e40c3a4 100644
--- a/Documentation/config/push.adoc
+++ b/Documentation/config/push.adoc
@@ -45,6 +45,9 @@ If you are working on a centralized workflow (pushing to the same repository you
pull from, which is typically `origin`), then you need to configure an upstream
branch with the same name.
+
+In a triangular workflow (pushing to a remote different from the upstream),
+`simple` behaves like `current`.
++
This mode is the default since Git 2.0, and is the safest option suited for
beginners.
base-commit: 59ff4886a579f4bc91e976fe18590b9ae02c7a08
--
gitgitgadget
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] doc: clarify push.default=simple in triangular workflows
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
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2026-05-22 8:49 UTC (permalink / raw)
To: Ivan Baluta via GitGitGadget; +Cc: git, Ivan Baluta
"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?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-22 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox