From: Junio C Hamano <gitster@pobox.com>
To: Usman Akinyemi <usmanakinyemi202@gmail.com>
Cc: git@vger.kernel.org, christian.couder@gmail.com,
me@ttaylorr.com, phillip.wood123@gmail.com, ps@pks.im
Subject: Re: [RFC PATCH 2/2] push: support pushing to a remote group
Date: Mon, 09 Mar 2026 06:38:16 -0700 [thread overview]
Message-ID: <xmqqzf4h6s3b.fsf@gitster.g> (raw)
In-Reply-To: <CAPSxiM_KVU7rE49=omWUwaYS-u_J6eQPDgTRjPop1gj6BM1qKQ@mail.gmail.com> (Usman Akinyemi's message of "Mon, 9 Mar 2026 06:26:49 +0530")
Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
> Also, in the cover letter, I asked some questions. I think you might
> have missed it.
>
> Quoting here again:
> "
> - push.default = simple interacts poorly with group pushes when the
> current branch has no upstream set, since setup_default_push_refspecs()
> will die on the first remote that is not the upstream. Users should
> use push.default = current or explicit refspecs for group pushes.
> It is worth discussing whether the group push path should automatically
> imply push.default = current, or whether a clear error message
> directing the user to configure this would be sufficient.
>
> - force-with-lease semantics across a group push are currently
> unmodified — the same CAS constraints are forwarded to every remote
> in the group. Whether this is the right behaviour or whether
> per-remote lease tracking is needed is an open question.
> "
>
> I will want feedback on this also.
Quite honestly, I do not have strong opinions on either of these
points, primarily because the answer would become self evident if we
follow a simple general principle to explain this feature to end
users, which is:
When you have N remotes r1, r2, ..., rN, and a remote group G that
expands (possibly recursively) to these N remotes, then for any and
all values of $options and $args, this command invocation
$ git push $options G $args
should mean exactly the same thing as
$ git push $options r1 $args
$ git push $options r2 $args
...
$ git push $options rN $args
So the answer to the first one would be:
"git push r1" (without any other parameters) may work while "git
push r2" (the same, wihtout any other parameters) may fail,
depending on how the push.default is set and on what branch you
run these two pushes. "git push G" should behave the same way.
There is nothing extra fancy needs to be done. If the user
wants to push to these N remotes as a whole in an identical way
by using remote group G, they are the one who is responsible to
make this sequences of pushes "git push r1; git push r2; ..."
make sense.
The answer to the second one would be derived the same way. If
$options includes the "--force-with-lease=<commit>", then the
command should behave as if copies of the command that pushes to
these N remotes, "git push --force-with-lease=<commit> r$i", are
invoked. If <commit> is not given (which is not a recommended even
for pushes to a single remote, because with background fetching,
guesses based on the remote-tracking branches are never be
reliable), the command may guess what commit to expect on the remote
the same way as if these N independent pushes are made without using
group feature (which of course may make different guesses for each
remote, if their remote-tracking branches are pointing at different
commits).
next prev parent reply other threads:[~2026-03-09 13:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 22:32 [RFC PATCH 0/2] push: add support for pushing to remote groups Usman Akinyemi
2026-03-05 22:32 ` [RFC PATCH 1/2] remote: move remote group resolution to remote.c Usman Akinyemi
2026-03-06 18:12 ` Junio C Hamano
2026-03-09 0:43 ` Usman Akinyemi
2026-03-05 22:32 ` [RFC PATCH 2/2] push: support pushing to a remote group Usman Akinyemi
2026-03-07 2:12 ` Junio C Hamano
2026-03-09 0:56 ` Usman Akinyemi
2026-03-09 13:38 ` Junio C Hamano [this message]
2026-03-18 20:40 ` [RFC PATCH v2 0/2] push: add support for pushing to remote groups Usman Akinyemi
2026-03-18 20:40 ` [RFC PATCH v2 1/2] remote: move remote group resolution to remote.c Usman Akinyemi
2026-03-18 20:40 ` [RFC PATCH v2 2/2] push: support pushing to a remote group Usman Akinyemi
2026-03-18 20:57 ` Junio C Hamano
2026-03-18 21:58 ` Junio C Hamano
2026-03-18 22:25 ` Junio C Hamano
2026-03-19 17:02 ` Junio C Hamano
2026-03-25 18:42 ` Usman Akinyemi
2026-03-18 21:57 ` [RFC PATCH v2 0/2] push: add support for pushing to remote groups Junio C Hamano
2026-03-18 23:13 ` Usman Akinyemi
2026-03-25 19:09 ` [RFC PATCH v3 " Usman Akinyemi
2026-03-25 19:09 ` [RFC PATCH v3 1/2] remote: move remote group resolution to remote.c Usman Akinyemi
2026-03-25 19:09 ` [RFC PATCH v3 2/2] push: support pushing to a remote group Usman Akinyemi
2026-03-25 19:47 ` Junio C Hamano
2026-03-27 22:18 ` Junio C Hamano
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=xmqqzf4h6s3b.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
--cc=usmanakinyemi202@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