git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] remote: add new sync command
Date: Mon, 7 Nov 2011 20:35:07 +0200	[thread overview]
Message-ID: <CAMP44s358k4EsCg+K6MeLEU4eLbb4mWyX9AdAf4P9CHvf9Lrwg@mail.gmail.com> (raw)
In-Reply-To: <20111107172218.GB3621@sigill.intra.peff.net>

On Mon, Nov 7, 2011 at 7:22 PM, Jeff King <peff@peff.net> wrote:
> On Mon, Nov 07, 2011 at 06:07:12PM +0200, Felipe Contreras wrote:
>
>> This is useful to mirror all the branches in the current repo to
>> another.
>> [...]
>> +'sync'::
>> +
>> +Synchronizes local branches with certain remote. This is useful to backup all
>> +the branches in a local repository to a remote one, regardless of what upstream
>> +is configured for each branch.
>> ++
>> +With `--prune`, remote branches will be deleted if they are not also locally.
>> ++
>> +With `--new`, local branches that are not yet in the remote will be pushed too.
>> ++
>> +With `--all`, basically both `--prune` and `--new` will be selected.
>> ++
>> +With `--force`, existing branches will be forced to update, like `git push
>> +--force`.
>> ++
>> +With `--dry-run`, all the changes will be reported, but not really happen.
>
> Why is this in "git remote", and not "git push"?  The former is usually
> about managing the configuration of remotes, not about actually doing
> the ref transfer (the "-f" flag excepted, but that is clearly just
> calling out to "fetch").

I don't know, seems logical to me what 'git remote sync' does, but
'git push sync'? That sounds weird, and there are no 'git push foo'
commands.

> And how does this differ from "git push --mirror"? It looks like you
> have more options for what pushing all versus pruning, but wouldn't it
> be better for "git push" to grow those options?

But how? --mirror is just an option, I want a separate command, with
it's own options.

Cheers.

-- 
Felipe Contreras

  reply	other threads:[~2011-11-07 18:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 16:07 [RFC/PATCH] remote: add new sync command Felipe Contreras
2011-11-07 17:22 ` Jeff King
2011-11-07 18:35   ` Felipe Contreras [this message]
2011-11-07 18:39     ` Jeff King
2011-11-07 20:51       ` Felipe Contreras
2011-11-07 21:01         ` Jeff King
2011-11-07 21:25           ` Junio C Hamano
2011-11-07 21:31             ` Jeff King
2011-11-08 16:43             ` Felipe Contreras
2011-11-08 17:49               ` Junio C Hamano
2011-11-08 17:59                 ` Felipe Contreras
2011-11-09  3:36                   ` Junio C Hamano
2011-11-11 10:35                     ` Jakub Narebski
2011-11-11 16:38                       ` Junio C Hamano
2011-11-11 22:00                         ` Jakub Narebski
2011-11-08 17:31           ` Felipe Contreras
2011-11-08 18:14             ` Jeff King
2011-11-11 12:30               ` Felipe Contreras
2011-11-11 18:13                 ` Jeff King
2011-11-12 22:07                   ` Felipe Contreras
2011-11-14 12:25                     ` Jeff King
2011-11-14 13:57                       ` Felipe Contreras
2011-11-21 21:44                         ` Jeff King
2011-11-21 23:47                           ` Felipe Contreras
2011-11-30  7:01                             ` Jeff King
2011-11-30 11:47                               ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP44s358k4EsCg+K6MeLEU4eLbb4mWyX9AdAf4P9CHvf9Lrwg@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).