git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: <git@vger.kernel.org>
Subject: [PATCH RFC 0/8] introduce 'git remote add --push' and 'git clone --push'
Date: Mon, 20 Jul 2009 19:49:47 +0200	[thread overview]
Message-ID: <1248112195-3761-1-git-send-email-bonzini@gnu.org> (raw)

I post as an initial RFC the third series in the push.default saga.
This is on top of origin/next and even then it requires the
"push --current" patches to be fully functional.  Even without it,
however, it will create correct configuration.

The series adds --push options to "git remote add" and "git clone".
These accept a push strategy of the same kind as "push.default",
and will use it to create push configuration and refspecs.  These
will then override push.default.

The argument is optional, in which case it will be taken from the
"push.default" config key itself.  In this case, since the user explicitly
requested something they did not configure, a warning is emitted similar
to the one of 1.6.3.  If --push is used appropriately, in a non-specified
future "git push" might not use push.default anymore and thus require
a push refspec.  (Or more realistically, it would look at push.default,
but only to suggest the user commands that do the transition).

This patch is a bit harder to justify than the others so far, since
it may as well look like a feature in search of a use case.  To this,
my reply is that this is just a step towards a more polished (IMO)
implementation of the existing "push.default" feature.  Actually, the
patch is big but it is mostly builtin-remote.c and tests.  And you
will have to put up with this for only another series or two.

Patch 1 is just taken from the push --current series.  Patch 2 adds
a new value for `push.default', so that it's easier to map --mirror
to a --push suboption.

Patches 3 and 4 add the option to "git remote add" (refactoring
first, adding the feature later).

Patches 5 to 8 add the option to "git clone".  The first two share
the code for the config setup between "git remote add" and "git clone".
The third adds a new function to get just the global configuration
(not the repository one), for usage in "git clone" before the repository
is actually created.  The final one finally adds the new option,
which is little more than tweaking the call into "git remote add".

That's it for now.  I'll post the final version of this series when I
get comments *and* once both autosetuppush and push --current have been
committed to next.  In the meanwhile, opinions, reviews and flames are
welcome as usual.


Paolo Bonzini (8):
      reintroduce PUSH_DEFAULT_UNSPECIFIED
      push: add push.default = mirror
      git remote add: refactor configuration
      git remote add: add --push option
      clone: refactoring of building the fetch refspec
      clone: use setup_remote_config
      config: add git_config_norepo
      clone: add --push option

 Documentation/config.txt     |    2 +
 Documentation/git-clone.txt  |   13 +++-
 Documentation/git-remote.txt |   13 ++--
 builtin-clone.c              |  133 +++++++++++++++---------------
 builtin-push.c               |   13 +++-
 builtin-remote.c             |  188 ++++++++++++++++++++++++++++++++++--------
 cache.h                      |    5 +
 config.c                     |   74 +++++++++++-----
 environment.c                |    2 +-
 remote.h                     |    3 +
 t/t5505-remote.sh            |   73 ++++++++++++++++
 t/t5517-push-mirror.sh       |   22 +++++-
 t/t5601-clone.sh             |   78 +++++++++++++++++
 13 files changed, 486 insertions(+), 133 deletions(-)

             reply	other threads:[~2009-07-20 17:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 17:49 Paolo Bonzini [this message]
2009-07-20 17:49 ` [PATCH RFC 1/8] reintroduce PUSH_DEFAULT_UNSPECIFIED Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 2/8] push: add push.default = mirror Paolo Bonzini
2009-07-20 20:46   ` Junio C Hamano
2009-07-20 21:14     ` Paolo Bonzini
2009-07-20 21:34       ` Junio C Hamano
2009-07-20 21:36         ` Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 3/8] git remote add: refactor configuration Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 4/8] git remote add: add --push option Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 5/8] clone: refactoring of building the fetch refspec Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 6/8] clone: use setup_remote_config Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 7/8] config: add git_config_norepo Paolo Bonzini
2009-07-20 17:49 ` [PATCH RFC 8/8] clone: add --push option Paolo Bonzini
2009-07-20 22:15 ` [PATCH RFC 0/8] introduce 'git remote add --push' and 'git clone --push' Junio C Hamano
2009-07-21 10:33   ` Paolo Bonzini
2009-07-21 21:00     ` Junio C Hamano

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=1248112195-3761-1-git-send-email-bonzini@gnu.org \
    --to=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    /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).