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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 19, 2007 at 02:32:38AM -0500, Shawn O. Pearce wrote:
> <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`
> 
> 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.
> 
> Yes, I really do have multiple remotes setup to the access the
> same (remote) physical disk.  :)

Here are a couple of things that I'm thinking about doing with the
patch I submitted yesterday:

1) Change the configuration parameter from remote.fetch to
remotes.default.update, and let "git remote update" take a parameter,
"git remote update <name>", where it will look up the list of remotes
to fetch via remotes.<name>.update, and default <name> to "default" if
it is not specified.

2) In the case of <name> == default, if remotes.default.update does
not exist, it will update all remotes, skipping remotes where
remote.*.no_default_fetch is true.  (This allows people who want to
omit certain special case remotes that only work if their connection
to the intranet is up, etc., to be able to set up something
convenientl; but for people who have more complex setups, they will
have to use the method specified in (1) above.

I thought about doing this via git-fetch, but (1) git-fetch.sh is
already way too complicated as it is, and I see that JC is in the
process of rewriting portions of it to C; by implementing in
git-remote.perl I avoided potential patch conflicts, and (2) fetching
groups of remotes would be overloading concepts for git-fetch, which
makes not only the implementation hard, but also the potential
semantics.  i.e., what does this mean?

[remote "cs"]
	remote = cs-one
	remote = cs-two
	url = git://git.kernel.org/pub/scm/git/git.git
	fetch = +refs/heads/*:refs/remotes/origin/*

						- Ted
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]