git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Alex Henrie <alexhenrie24@gmail.com>,
	Marc Branchaud <marcnarc@xiplink.com>,
	Philip Oakley <philipoakley@iee.email>,
	Elijah Newren <newren@gmail.com>,
	Stephen Haberman <stephen@exigencecorp.com>
Subject: Re: [PATCH] doc: pull: fix rebase=false documentation
Date: Wed, 21 Jul 2021 20:24:25 -0500	[thread overview]
Message-ID: <60f8c8c92a215_1d0abb20859@natae.notmuch> (raw)
In-Reply-To: <xmqqtukn9p0g.fsf@gitster.g>

Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
> > Felipe Contreras <felipe.contreras@gmail.com> writes:
> >
> >> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
> >> index 5c3fb67c01..7f4b2d1982 100644
> >> --- a/Documentation/git-pull.txt
> >> +++ b/Documentation/git-pull.txt
> >> @@ -117,7 +117,7 @@ When set to `preserve` (deprecated in favor of `merges`), rebase with the
> >>  `--preserve-merges` option passed to `git rebase` so that locally created
> >>  merge commits will not be flattened.
> >>  +
> >> -When false, merge the current branch into the upstream branch.
> >> +When false, merge the upstream branch into the current branch.
> >>  +
> >>  When `interactive`, enable the interactive mode of rebase.
> >>  +
> >
> > Looks correct.  Will queue.  Thanks.
> 
> By the way, I'll update the proposed log message to say only that
> the documentation needs to be fixed as it does not say what the
> command does.

Fine by me, although I'd appreciate if you minimize the use of your
words and maximize the use of mine.

  The documentation says --rebase=false merges our current branch into
  the upstream branch, and while many people think that's what should
  happen, that's not what actually happens; it's the *opposite*.

  Fix the documentation so that we explain what the code actually does.

> We should be able to fix the inaccuracies in the
> documentation quickly without advocating different behaviour or
> trashing the current behaviour in the proposed log message.

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 also happen to think that "flipping the merge order" is not a good
> thing to do anyway [*1*]; keeping the log message to state just "the
> description does not reflect reality-fix it" has the added benefit
> that we do not have to debate it.

But people have spent many hours debating it already.

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.

This has already been discussed many times, and the problem remains.

[1] https://lore.kernel.org/git/CA+55aFwM0vy+pw-Xv=gA19ULMwAXNPhdO3qR5A3hkMrZKJFNSQ@mail.gmail.com/

-- 
Felipe Contreras

  reply	other threads:[~2021-07-22  1:24 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 [this message]
2021-07-23  7:30       ` Jeff King
2021-07-23 10:05         ` Philip Oakley
2021-07-23 16:54           ` Felipe Contreras
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60f8c8c92a215_1d0abb20859@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=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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).