From: Paolo Bonzini <bonzini@gnu.org>
To: <git@vger.kernel.org>
Subject: [PATCH 0/3]: add git push --current and remote.*.pushHeadOnly
Date: Tue, 14 Jul 2009 01:07:39 +0200 [thread overview]
Message-ID: <1247526462-17584-1-git-send-email-bonzini@gnu.org> (raw)
This second series is gets rid of the most annoying part
(IMHO) of push.default = tracking, i.e. the fact that its
behavior cannot be achieved using git's ordinary tools.
While autosetuppush is enough to set the refspecs correctly,
push.tracking does not push _all_ tracked branches, but
only the current one (because it implicitly adds only
one refspec, while autosetuppush places them all in the
configuration).
What I introduce here is "git push --current" and a companion
remote.*.pushHeadOnly option to make it the default. The
difference between "git push HEAD" and "git push --current"
is that the latter will still walk the remote.*.push refspecs,
but honor only the one matching HEAD.
Together with autosetuppush, this more or less achieves the
same result as push.tracking, at least for newly created
remotes. A subsequent series will handle the transition.
Patch 1 is the meat of the implementation. Patch 2 touches
one detail about how to handle "git push --current" when
the remote does not have a corresponding push refspec.
Patch 3 adds remote.*.pushHeadOnly.
Paolo Bonzini (3):
push: add --current
change default push refspec when --current is given
push: add remote.*.pushHeadOnly configuration
Documentation/config.txt | 6 ++++
Documentation/git-push.txt | 15 +++++++++-
builtin-push.c | 15 ++++++++--
http-push.c | 27 ++++++++++++++----
remote.c | 42 ++++++++++++++++++++++++-----
remote.h | 3 ++
t/t5516-fetch-push.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++
transport.c | 22 ++++++++++++++-
transport.h | 1 +
9 files changed, 177 insertions(+), 18 deletions(-)
next reply other threads:[~2009-07-13 23:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 23:07 Paolo Bonzini [this message]
2009-07-13 23:07 ` [PATCH 1/3] push: add --current Paolo Bonzini
2009-07-19 21:32 ` Nanako Shiraishi
2009-07-19 21:46 ` Paolo Bonzini
2009-07-13 23:07 ` [PATCH 2/3] change default push refspec when --current is given Paolo Bonzini
2009-07-13 23:07 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
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=1247526462-17584-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).