Re: Way to "impersonate" remote or sync remotes without fetching everything?
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Apr 11, 2025, 18:43 UTC
- Message-ID
- <CALnO6CCUHE6-RcZkTBYT-CeXHnYPBPe1eGSogWd7=5tK5NyuxA@mail.gmail.com>
- In-Reply-To
- <2afd91ca-13d8-4b40-aa8b-c1917f0882df@frank.fyi>
On Sat, Apr 5, 2025 at 10:01 AM Klaus Frank <vger.kernel.org@frank.fyi> wrote:
> Also not to mention that none of my current approaches can do a real > sync, they are all relying upon having one of the remotes designated as > the authoritative source and if any of the others changed instead it'll > just fail.
Maybe I haven't totally understood your use-case, but what if the authoritative source is your local repository, and then you push to all your remote mirrors to publish your trees? That is, I don't think it's a good idea to have a remote worker automatically pushing changes across all the mirrors; rather, you get to be in control of when you push to those mirrors.
(I thought there was a push-equivalent of remotes.<group>, which I was going to suggest as being helpful for this kind of mode where some remotes are your mirrors and others are collaborators, but I can't find it.) Configuring a new remote with pushurls that point to the other remotes [1] seems to be the way to make pushing to multiple remotes easy.
Of course, this doesn't help CI, but then it can just pick any mirror it wants to fetch a commit to build?
[1]: https://stackoverflow.com/a/14290145/4400820
-- D. Ben Knoble