
On 2014-06-06 at 14:11:21 +0200, Simon Peyton Jones wrote:
I ran that command and it didn't complain. No idea whether it worked or not though! This now appears in .gitconfig
[url "ssh://git@github.com/haskell/haddock.git"] pushInsteadOf = ssh://git@ghc.haskell.org/haddock.git
But shouldn't sync-all set this push-url stuff up correctly? Having to remember to look for redirects in .gitconfig seems like one more way to get confused when looking at a .git/config file.
That's a valid argument of course. Otoh, I consider the {insteadOf,pushInsteadOf} more convenient, as it allows for simpler workflows, here's a few benefits I can see from the top of my head: - You have to set it up once, and then something like git clone --recursive git://git.haskell.org/ghc.git simply works, even when you want to use the GitHub mirror and git.haskell.org is unreachable. (without that, you'd have to first clone ghc.git non-recursively from GitHub, then 'git submodule init', then rewrite the submodule urls, and then finally 'git submodule update') - If git.haskell.org goes down suddenly or you need to switch from git:// to https:// suddenly, simply reconfigure your git-redirects to point to the new Git urls. And everything works as before -- for *all* your local GHC clones, but uses the new locations. If git.haskell.org is back up, you can revert the redirects. - When working with multiple local GHC clones, you don't have to keep track whether you need to update the push-urls/fetch-urls for submodules for the invidual clone. If you have configured the global redirects properly in some other GHC clone, it'll just work for the other clones as well. - When switching between post/pre-submodule conversion states, the global redirects take care of preserving/providing the proper push-url mappings. - For the previously used standard use-case, the following simple git config --global \ url."ssh://git@git.haskell.org/".pushInsteadOf \ git://git.haskell.org/ one-time "parametric" redirect rule setup, IMHO beats the complexity of the current './sync-all set-url --push' implementation which has nasty corner-cases to take into account.