From: Dmitry Potapov <dpotapov@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
Michael J Gruber <git@drmicha.warpmail.net>
Subject: Re: Use "git pull --ff-only" by default?
Date: Thu, 27 May 2010 22:09:08 +0400 [thread overview]
Message-ID: <20100527180908.GA10398@dpotapov.dyndns.org> (raw)
In-Reply-To: <A612847CFE53224C91B23E3A5B48BAC74483677DDC@xmail3.se.axis.com>
On Tue, May 25, 2010 at 10:43:22AM +0200, Peter Kjellerstedt wrote:
>
> > > > I think this boils down to having a few people who are allowed to
> > > > push merges because they can make these decisions. Even if people
> > > > don't merge "origin" but their own branches they can create a mess,
> > > > so you cannot differentiate based on that.
> > >
> > > In a larger organization this does not work. Most of our developers
> > > are responsible for at least one subsystem and expected to be the one
> > > responsible for its master branch.
> >
> > Right. Now, if only one person who is responsible for this subsystem is
> > expected to be able to push changes to the master branch then this
> > person will never need "git pull --ff-only". In fact, when he pulls
>
> Well, most of our subsystems have at least one backup maintainer
Which is very reasonable, but I do not see how it contradicts to
anything what I said above...
> > changes from others, he needs a real merge. So, this alone a very
> > strong argument against making ff-only by default in any configuration.
>
> Well, we use a central repository with development made on official
> topic branches, so he is not supposed to pull from others.
I am not sure what kind of workflow you are talking here, but in any
case, the maintainer can pull those official topic branches when he
believes it is ready for integration...
> He will
> fetch from the central repository and merge the topic branches.
of course, you can do that using two commands instead of one...
> That way the user
> would have to take an explicit action, and decide whether he should
> do a git pull --rebase, put his local changes on a branch or resolve
> the problem some other way (initially that would probably be by
> asking me what is going on and what to do, and that way learn how to
> handle the situation). Silently creating an automatic merge that does
It is as much automatic as those that are created by "git merge". If
someone says "git pull", it means to do merge. In fact, before Git 1.5,
"git pull" was the only porcelain command to do local merges (while
"git merge" was a plumbing command with a different arguments than it
has now). So, if you are only interested in fetching new changes then
you should use "git fetch". Changing the default for "git pull" to
do --ff-only is akin changing "git merge" to do --ff-only...
> not have any meaning and will just confuse anyone looking at the
> revision history later is not something that I want, especially as it
> would make the job harder for the maintainer who is supposed to merge
> the changes later and then has to untangle the mess.
First, when you make a presentation of Git and the workflow that you are
going to use, you can explicitly say what commands should be and what
should not be normally used in this workflow. Second, when a maintainer
sees a mess, he can just tell to this developer to rebase his changes
and never use "git pull"... In fact, this is the least problem comparing
to all other typical mistakes that inexperience developers do, such as,
writing meaningless comments to commits, failure to split changes in
logic steps, forget to test changes, etc...
>
> > And if you think that "pull --ff-only" is very useful for some reason,
> > nobody prevents to add an alias for that command, but this command
> > should never be called as "pull", because "pull" has always been about
> > merging changes, and if it does something different, you should call it
> > differently. Why don't call it as "fast-forward" or "ff" for short?
>
> I do not agree with you. When I do git pull it is to get all changes
> made to the official repository. I do not want any local changes I have
> to be merged with the official changes, but rather I want my changes
> to stay separate, either by using git pull --rebase (if I have hacked
> on the same branch for some reason), or by using a private topic branch
> that I keep rebasing on master.
If you want to get changes then you should use "git fetch", and not "git
pull", because the latter is about getting and _merging_. Why are you
trying so hard to change a well established meaning of the pull command?
Dmitry
next prev parent reply other threads:[~2010-05-27 18:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 12:59 Use "git pull --ff-only" by default? Peter Kjellerstedt
2010-05-21 13:46 ` Ævar Arnfjörð Bjarmason
2010-05-21 13:49 ` Michael J Gruber
2010-05-21 14:47 ` Peter Kjellerstedt
2010-05-21 15:18 ` Michael J Gruber
2010-05-21 19:13 ` Jay Soffian
2010-05-22 11:37 ` Michael J Gruber
2010-05-24 8:22 ` Peter Kjellerstedt
2010-05-24 12:56 ` Dmitry Potapov
2010-05-25 8:43 ` Peter Kjellerstedt
2010-05-27 18:09 ` Dmitry Potapov [this message]
2010-05-21 17:49 ` Peter Krefting
2016-04-29 6:38 ` Monsignor
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=20100527180908.GA10398@dpotapov.dyndns.org \
--to=dpotapov@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=peter.kjellerstedt@axis.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).