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

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

 



Paolo Bonzini <bonzini@xxxxxxx> 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.
--
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]

  Powered by Linux