All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Philip Oakley <philipoakley@iee.email>, Jeff King <peff@peff.net>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Alex Henrie <alexhenrie24@gmail.com>,
	Marc Branchaud <marcnarc@xiplink.com>,
	Elijah Newren <newren@gmail.com>,
	Stephen Haberman <stephen@exigencecorp.com>
Subject: Re: [PATCH] doc: pull: fix rebase=false documentation
Date: Fri, 23 Jul 2021 11:54:57 -0500	[thread overview]
Message-ID: <60faf46153f62_defb208aa@natae.notmuch> (raw)
In-Reply-To: <9cb70776-8684-9d1e-e4c5-188c6c19fdc7@iee.email>

Philip Oakley wrote:
> On 23/07/2021 08:30, Jeff King wrote:
> > On Wed, Jul 21, 2021 at 08:24:25PM -0500, Felipe Contreras wrote:
> >
> >> I'm not trashing the current behavior, I'm explaining what the consensus
> >> is. I spent several man-days re-reading old threads, and this is the
> >> consensus of what should happen:
> >>
> >>   1. git pull              # merge HEAD into upstream
> >>   2. git pull origin topic # merge topic into HEAD
> >>
> >> Of the people that expressed an opinion, 100% of them stated that what
> >> `git pull` does in the first case today is not desirable.
> > I did not participate in the threads you linked earlier, so I am
> > probably not in that 100%. But you did use my name below:
> >
> >> Yes, you are correct that if *everyone* followed the topic branch
> >> workflow, everything would work correctly, but that's not what happens
> >> in reality, in reality people do all kinds of workflows, and wrong
> >> merges are pervasive.
> >>
> >> Everyone--including Linus, Jeff, and you--agree that there's two
> >> different ways of using `git pull`: integrator versus developer.
> >>
> >> When a user is doing `git pull` to synchronize changes to push to the
> >> same branch, that's a centralized two-way workflow, so he is acting both
> >> as an integrator and as a developer, and it's in that particular case
> >> that the order of the parents should be reversed. Everyone agrees on
> >> that.
> >>
> >> When the user the opposite explicitely: `git pull origin master`
> >> Linus calls it a "back-merge" [1], and in that case the order of the
> >> parents should not be reversed.
> > So I feel compelled to say now that I do not think that changing the
> > order of parents for "git pull" is the obviously correct thing to do.
> While I never `pull` because it's not right for me as a 'contributor', I
> do agree that the default 'maintainer' view of `pull` will need to be
> retained for long term backward compatibility.

Of course, but a maintainer never does `git pull` to merge a pull request,
she does `git pull github/john topic`, does she not?

Nobody was in favor of reversing the parents in the case of
`git pull $where $what`, that would be the wrong thing to do.

So the maintainer view of `git pull` would remain fine.

> What I have rarely seen in the discussion is explanation that is based
> on workflow style, though the potential `update` command (1) may break
> some of the deadlock about the direction of 'pull requests', and
> possibly confusion regarding the location of the 'golden' publish repo.

I think that's because most of the people that follow a workflow don't
have this problem.

It's only newcomers that don't follow any workflow that are hit by this.
Another name for this no-workflow is trunk-based development [1].
Essentially everyone pulls and pushes to the same branch.

People that use topic branches don't need `git update`, people who
follow trunk-based development do.

> (1) there are a lot of 'update' commands floating about, esp on Git for
> Windows. If there is a suitably named `update` command to do the `pull
> --contributor` merge-ff swap then many of the issues could fade away.

Indeed. And at least when I was maintaining my git-fc fork, people did
enjoy my implementation of `git update`.

[1] https://trunkbaseddevelopment.com/

-- 
Felipe Contreras

  reply	other threads:[~2021-07-23 16:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 22:15 [PATCH] doc: pull: fix rebase=false documentation Felipe Contreras
2021-07-21 23:33 ` Junio C Hamano
2021-07-22  0:21   ` Junio C Hamano
2021-07-22  1:24     ` Felipe Contreras
2021-07-23  7:30       ` Jeff King
2021-07-23 10:05         ` Philip Oakley
2021-07-23 16:54           ` Felipe Contreras [this message]
2021-07-23 15:58         ` Junio C Hamano
2021-07-23 18:29           ` Felipe Contreras
2021-07-23 21:44             ` Junio C Hamano
2021-07-24  3:56               ` Felipe Contreras
2021-07-23 16:36         ` 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=60faf46153f62_defb208aa@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=marcnarc@xiplink.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.email \
    --cc=stephen@exigencecorp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.