public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Usman Akinyemi <usmanakinyemi202@gmail•com>
To: usmanakinyemi202@gmail•com, git@vger•kernel.org
Cc: christian.couder@gmail•com, gitster@pobox•com, me@ttaylorr•com,
	phillip.wood123@gmail•com, ps@pks•im
Subject: [RFC PATCH v5 0/3] push: add support for pushing to remote groups
Date: Mon, 18 May 2026 23:57:18 +0530	[thread overview]
Message-ID: <20260518182721.155070-1-usmanakinyemi202@gmail.com> (raw)
In-Reply-To: <20260503153402.1333220-4-usmanakinyemi202@gmail.com>

This RFC series adds support for `git push` to accept a remote group
name (as configured via `remotes.<name>` in config) in addition to a
single remote name, mirroring the behaviour that `git fetch` has
supported for some time.

A user with multiple remotes configured as a group can now do:

    git push all-remotes

instead of pushing to each remote individually, in the same way that:

    git fetch all-remotes

already works.

The series is split into three patches:

  - Patch 1 fix sign-compare warnings in push_cas_option
  - Patch 2 moves `get_remote_group`, `add_remote_or_group`, and the
    `remote_group_data` struct out of builtin/fetch.c and into
    remote.c/remote.h, making them part of the public remote API.

  - Patch 2 extends builtin/push.c to use the newly public
    `add_remote_or_group()` to resolve the repository argument as
    either a single remote or a group, and pushes to each member of
    the group in turn.

Changes in v6:
- fix docs formating 

Range-diff v5 -> v6:

1:  e01126890c = 1:  e01126890c remote: fix sign-compare warnings in push_cas_option
2:  adbce652e6 = 2:  adbce652e6 remote: move remote group resolution to remote.c
3:  a8d5f4b7bd ! 3:  62a4499be6 push: support pushing to a remote group
    @@ Documentation/git-push.adoc: further recursion will occur. In this case, `only`
     +	...
     +	git push <options> rN <args>
     +
    -+where r1, r2, ..., rN are the members of `all-remotes`.  No special
    ++where `r1`, `r2`, ..., `rN` are the members of `all-remotes`.  No special
     +behaviour is added or removed — the group is purely a shorthand for
     +running the same push command against each member remote individually.
     +
    @@ Documentation/git-push.adoc: further recursion will occur. In this case, `only`
     +any member push fails.
     +
     +This means the user is responsible for ensuring that the sequence of
    -+individual pushes makes sense. If `git push r1`` would fail for a given
    ++individual pushes makes sense. If `git push r1` would fail for a given
     +set of options and arguments, then `git push all-remotes` will fail in
    -+the same way when it reaches r1. The group push does not do anything
    ++the same way when it reaches `r1`. The group push does not do anything
     +special to make a failing individual push succeed.
     +
      OUTPUT

Usman Akinyemi (3):
  remote: fix sign-compare warnings in push_cas_option
  remote: move remote group resolution to remote.c
  push: support pushing to a remote group

 Documentation/git-push.adoc |  80 ++++++++++--
 builtin/fetch.c             |  42 ------
 builtin/push.c              | 251 +++++++++++++++++++++++++++++++-----
 remote.c                    |  37 ++++++
 remote.h                    |  16 ++-
 t/meson.build               |   1 +
 t/t5566-push-group.sh       | 160 +++++++++++++++++++++++
 7 files changed, 502 insertions(+), 85 deletions(-)
 create mode 100755 t/t5566-push-group.sh

-- 
2.54.0


  parent reply	other threads:[~2026-05-18 18:27 UTC|newest]

Thread overview: 39+ 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
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-31 22:35         ` Usman Akinyemi
2026-03-31 23:45         ` Usman Akinyemi
2026-04-01 16:56           ` Junio C Hamano
2026-03-27 22:18       ` Junio C Hamano
2026-04-27 14:05     ` [RFC PATCH v3 0/2] push: add support for pushing to remote groups Usman Akinyemi
2026-04-27 14:05       ` [RFC PATCH v4 1/2] remote: move remote group resolution to remote.c Usman Akinyemi
2026-04-27 14:05       ` [RFC PATCH v4 2/2] push: support pushing to a remote group Usman Akinyemi
2026-04-28  1:47       ` [RFC PATCH v3 0/2] push: add support for pushing to remote groups Junio C Hamano
2026-05-03 15:33       ` [RFC PATCH v5 0/3] " Usman Akinyemi
2026-05-03 15:34         ` [RFC PATCH v5 1/3] remote: fix sign-compare warnings in push_cas_option Usman Akinyemi
2026-05-03 15:34         ` [RFC PATCH v5 2/3] remote: move remote group resolution to remote.c Usman Akinyemi
2026-05-03 15:34         ` [RFC PATCH v5 3/3] push: support pushing to a remote group Usman Akinyemi
2026-05-12 15:05           ` Kristoffer Haugsbakk
2026-05-18 18:27           ` Usman Akinyemi [this message]
2026-05-18 18:27             ` [PATCH v6 1/3] remote: fix sign-compare warnings in push_cas_option Usman Akinyemi
2026-05-18 18:27             ` [PATCH v6 2/3] remote: move remote group resolution to remote.c Usman Akinyemi
2026-05-18 18:27             ` [PATCH v6 3/3] push: support pushing to a remote group Usman Akinyemi

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=20260518182721.155070-1-usmanakinyemi202@gmail.com \
    --to=usmanakinyemi202@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=me@ttaylorr$(echo .)com \
    --cc=phillip.wood123@gmail$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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