Subject: Re: [PATCH resend] make "git push" update origin and mirrors, "git push --mirror" update mirrors

From: "Shawn O. Pearce" <[email-masked]>
Date: Sat, 26 Apr 2008 13:01:26 -0400

Paolo Bonzini <[email-masked]> wrote:
> This patch builds on the infrastructure for remote.<nick>.mirror and
> tweaks the behavior of "git push".  The idea is that "git push",
> "git push --all", "git push --mirror", instead of defaulting to origin,
> become DWIM commands:
> 
> - "git push" pushes to origin *and* to all mirrors
> 
> - "git push --all" pushes to origin with --all.  I didn't make it push
>   to mirrors because --all and --mirror are incompatible.
> 
> - "git push --mirror" only updates mirror repositories, without touching
>   origin.
> 
> This is useful when a project has a public repository managed by the
> integrator, but the integrator also wants to publish his own mirror
> somewhere.  In this case, the integrator will just do "git push".

Sorry, I don't really see a use case behind this.  `git push` today
will push to origin all branches that exist both locally and already
on the remote.  If you want to push to multiple locations, just
specify the other URLs in the remote.origin.url configuration list.
Linus added support for that years ago.

> Similarly, if a developer uses the integrator's repository but
> wishes to publish his own mirror somewhere, he can just do "git push
> --mirror".

Why not just have a remote named "my-mirror" and do `git push my-mirror`?
Yes, its on keystroke longer to type.  Call it foo.  `git push foo` would
be shorter, and not require code changes in Git.

-- 
Shawn.