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

Re: [PATCH] Teach git-remote to update existing remotes by fetching from them

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 19, 2007, 13:21 UTC
Message-ID
<erc846$bk7$1@sea.gmane.org>
In-Reply-To
<81b0412b0702190305j20cf2d10w8f75c4345ba0fc26@mail.gmail.com>
Alex Riesen wrote:
Show 57 quoted lines
> On 2/19/07, Shawn O. Pearce <spearce@spearce.org> wrote:
>> Junio C Hamano <junkio@cox.net> wrote:
>> > "Theodore Ts'o" <tytso@mit.edu> writes:
>> >
>> > > This allows users to use the command "git remote update" to update all
>> > > remotes that are being tracked in the repository.
>> >
>> > Sounds like a good idea.  Thanks.
>>
>> <personalwishlist>
>>
>> It would be nice to define "gang remotes".  For example I want to
>> be able to have:
>>
>>   `git fetch cs`  ==  `git fetch cs-one; git fetch cs-two`
>>   `git fetch jc`  ==  `git fetch origin; git fetch alt`
> 
> I was thinking about something very similar.
> 
>> Why?  Well, I often have multiple remotes setup to the *same*
>> repository depending on the SSH hostname I want to use to access
>> that repository.  This has a lot to do with the way my firewalls
>> are setup and where I'm physically connected at any given time.
> 
> For all the same reasons :)
> 
>> Yes, I really do have multiple remotes setup to the access the
>> same (remote) physical disk.  :)
>>
>> Possible syntax:
>>
>>         [remote "cs"]
>>                 remote = cs-one
>>                 remote = cs-two
>>         [remote "jc"]
>>                 remote = origin
>>                 remote = alt
>>
> 
> Or :
> 
>   [remote "jc"]
>     url = git://...
>     fetch = refs/heads/*:remotes/jc/*
>     remote ("include"? "next"?) = origin
> 
> (I mean: it can be allowed to mix url/fetch and remote).
> 
> And:
> 
>   [remote "jc"]
>     fail = all-fail
>     remote = origin
>     remote = backup
> 
> IOW: the fetch fails only if all fetches fail (with default
> being "fail = first").
Or just allow fetch remotes to have multiple URLs, and fetch from all/try to fetch starting from first.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Alex RiesenNext: Theodore Tso
Message 5 of 8 in “Teach git-remote to update existing remotes by fetching from them”
  1. Teach git-remote to update existing remotes by fetching from themTheodore Ts'o, Feb 19, 2007
  2. Junio C HamanoFeb 19, 2007
  3. Shawn O. PearceFeb 19, 2007
  4. Alex RiesenFeb 19, 2007
  5. Jakub NarebskiFeb 19, 2007
  6. Theodore TsoFeb 19, 2007
  7. Junio C HamanoFeb 19, 2007
  8. Jakub NarebskiFeb 20, 2007

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.