From: Paolo Bonzini <bonzini@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Finn Arne Gangstad <finnag@pvv.org>
Subject: Re: [PATCH v3 0/3] add push --current and remote.*.pushHeadOnly
Date: Tue, 21 Jul 2009 00:09:07 +0200 [thread overview]
Message-ID: <4A64EB03.4050104@gnu.org> (raw)
In-Reply-To: <7vskgrum2v.fsf@alter.siamese.dyndns.org>
> Having to read this three times made me irritated enough to comment on
> this part of the cover letter.
Sorry (you weren't CCed on v1, though, were you?).
For me, the inherent problem of push.default is that it is a global
setting. As you say below, different remotes may have different
characteristics and this can happen within the same repository.
One example is an integrator (push.default=matching) that also develops
a few topic branches and wants to publish his tree so that people can
peek at them --- at the same time, he wants to be free to rebase there.
He can then use --mirror to set up the latter remote.
Now, instead, we have a person working in a set up like the one Finn
described. He is a subsystem integrator, so he publishes some stable
branches (push.default=matching again). For development, however, he
has to branch off the repositories published by other subsystem
integrators; for these he wants push.default=tracking semantics. He
then has to define push.default=tracking and configure the other remote
manually. Unlike the first user, this one needs to make a global
decision and adjust the git configuration whenever this global decision
does not fit.
In addition, if he wants to disable pushing to some repository, he
cannot use push.default=nothing anymore. The problem is that "the
exception [the setting of push.default that was desired for one
repository] became the rule [the global per-repository push.default
setting]", and this happened because there is no way to realize
push.default=tracking with the usual set of git tools, namely refspecs
and checkout -t.
While trying to understand the problem, I tried to see what it would
take to implement push.default using the existing git tools, and what
extra features would be needed. The resulting design had three new
features (per-remote tracking, autosetuppush and pushHeadOnly), and
everything else built on top of those (the --push patch series I posted
today). I actually liked the design, and decided it was worth pursuing
it instead of just turning push.default into a per-remote configuration.
It is way bigger than the push.default patches; on the other hand the
three new features may be otherwise desirable, and it also includes some
nice cleanups. However, because of this I placed too much attention to
the separate features and failed to show the big picture and what was
missing in the 1.6.3 implementation.
(Now, back to your comments).
> [...] If on the other hand your workflow is to fork topics from the remote
> integration branch(es) (e.g. topicA and fixB both forked from master taken
> from the remote), both topics will be set to push back to the same master
> branch on the remote side if you use branch.autosetuppush. In such a
> workflow, you work on these two topics, and when one of them is done, you
> want to push that one out, without having to push the other one that is
> not yet ready (beside, that one won't fast-forward).
> A "tracking" push that pushes all branches is actively a wrong thing to do
> in such a workflow.
Agreed.
autosetuppush is in fact not meant to be used by the usre, at least the
casual user who restricts himself to the "git remote" porcelain and
prefers not to deal into .git/config whenever possible. The idea is
that the user can use --push=tracking to express his workflow, and this
will set up pushHeadOnly and autosetuppush together. The combination of
the two options is safe, and provides the behavior that best suites the
user's workflow.
(Writing this final paragraph is what made me realize me that I was
wrong in not showing the big picture in the beginning. Giving hints
through the cover letters was not enough).
> In short, it is not necessarily bad that "push all matching" is much
> easier to set up and use than "push all tracking", and I think it is
> nothing to be annoyed about.
The problem is, when "the exception becomes the rule", is it still true
that "push all matching" is easier to set up?
Paolo
prev parent reply other threads:[~2009-07-20 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 11:58 [PATCH v3 0/3] add push --current and remote.*.pushHeadOnly Paolo Bonzini
2009-07-20 11:58 ` [PATCH 1/3] reintroduce PUSH_DEFAULT_UNSPECIFIED Paolo Bonzini
2009-07-20 11:58 ` [PATCH 2/3] push: add --current Paolo Bonzini
2009-07-20 11:58 ` [PATCH 3/3] push: add remote.*.pushHeadOnly configuration Paolo Bonzini
2009-07-20 20:38 ` [PATCH v3 0/3] add push --current and remote.*.pushHeadOnly Junio C Hamano
2009-07-20 22:09 ` Paolo Bonzini [this message]
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=4A64EB03.4050104@gnu.org \
--to=bonzini@gnu.org \
--cc=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).