git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Taylor R Campbell <git@campbell.mumble.net>
Cc: "Matěj Cepl" <mcepl@cepl.eu>, git@vger.kernel.org
Subject: Re: Synchronous replication on push
Date: Sat, 2 Nov 2024 14:49:04 +0000	[thread overview]
Message-ID: <ZyY74N_NjmaJ2677@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <20241102133511.6375B609AC@jupiter.mumble.net>

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

On 2024-11-02 at 13:35:11, Taylor R Campbell wrote:
> I'm asking about how to configure a _single_ frontend remote, from the
> perspective of developers who are pushing from their development
> workstations, so that it replicates to one or many backend stores.
> This is, for example, the usage model of Github's proprietary
> implementation.

I don't think there's built-in functionality for this and I'm not sure
that it can be done without additional software.

If you really wanted to try to do this with out of the box Git, you
could create a `pre-receive` hook that did policy controls and then on
success, took all of the objects from the quarantine and rsynced them
(without overwriting) to the remote store, and then use the
`reference-transaction` hook to replicate the reference transaction to
the remote side via SSH or something.  I haven't tested this, so it
might or might not work, but you could try it.

Note that GitHub has a separate service that does the replication and
intercepts the ref update to send it through the three-phase commit, so
they don't rely on features of core Git to implement this functionality.
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2024-11-02 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02  2:06 Synchronous replication on push Taylor R Campbell
2024-11-02 10:09 ` Matěj Cepl
2024-11-02 13:35   ` Taylor R Campbell
2024-11-02 14:49     ` brian m. carlson [this message]
2024-11-04 13:35       ` Taylor R Campbell
2024-11-04 14:40         ` Konstantin Ryabitsev
2024-11-04 15:50           ` Taylor R Campbell
2024-11-04 22:36         ` brian m. carlson
2024-11-04 23:47 ` Jeff King
2024-11-05  1:34   ` Taylor R Campbell

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=ZyY74N_NjmaJ2677@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@campbell.mumble.net \
    --cc=git@vger.kernel.org \
    --cc=mcepl@cepl.eu \
    /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;
as well as URLs for NNTP newsgroup(s).