git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git repository mesh?

From
Sergio <sergio.callegari@gmail.com>
Date
Nov 25, 2009, 08:42 UTC
Message-ID
<loom.20091125T092917-792@post.gmane.org>
In-Reply-To
<fcaeb9bf0911242007t1294bddej87b48691ea283e21@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds <at> gmail.com> writes:
Show 15 quoted lines
> 
> Hi,
> 
> I work on a few machines so I have repositories on all of them. One
> repository can pull from or push to any other repositories (in case of
> push, it pushes on remote branches). I avoid a central repository
> because it's quite inconvenient when you just need to push some
> changes to a machine, you have to push it to the central repository
> then pull from that (and if the central repository is on WAN, double
> inconvenient). Maybe this model is just plain wrong, but it'd be fun
> to see if Git can work with this model.
> 
> The first thing that annoys me is remote repository management.
> Everytime I add a new repository to the mesh, I need to update .config
> of all repositories. 

If I remember correctly, there was in the past the idea of allowing some limited shell variable substitution in the config file.

This would allow to have a single config for all the machines with remote entries. Something like

[remote "host1"]
        url = ssh://host1/path
        fetch = +refs/heads/*:refs/remotes/host1/*
        push = +refs/heads/*:refs/remotes/$hostname/*
[remote "host2"]
        url = ssh://host2/path
        fetch = +refs/heads/*:refs/remotes/host2/*
        push = +refs/heads/*:refs/remotes/$hostname/*
...

In other terms, admitting that all the candidate machines are known at the very start, you could start a repo on any of the host, placing in the config file all the possible hosts. Moreover, not needing to have a different config for each host may make it easier to manage (propagate by simple scp) or even to version control.

To the best of my knowledge the idea was not implemented in the end, but I think that a patch for variable substitution in the config file might still be found on the ML.

Sergio
Previous: Matthieu MoyNext: Alex Riesen
Message 8 of 9 in “Git repository mesh?”
  1. Nguyen Thai Ngoc DuyNov 25, 2009
  2. Matthieu MoyNov 25, 2009
  3. Nguyen Thai Ngoc DuyNov 25, 2009
  4. Matthieu MoyNov 25, 2009
  5. Nguyen Thai Ngoc DuyNov 25, 2009
  6. Jakub NarebskiNov 25, 2009
  7. Matthieu MoyNov 25, 2009
  8. SergioNov 25, 2009
  9. Alex RiesenNov 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.