git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc: pull: improve rebase=false documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 14, 2023, 19:00 UTC
Message-ID
<xmqqzg1oinq1.fsf@gitster.g>
In-Reply-To
<226cc3ed753ee809a77ac7bfe958add7a4363390.1694661788.git.dsimic@manjaro.org>
Dragan Simic <dsimic@manjaro.org> writes:
> Mention in the documentation that --rebase defaults to false.
I am not quite sure if this is an improvement, though.

It is true that, if you do not have any of your own funny configuration, your "git pull" will *not* rebase.

But that is "if you do not give the --rebase option, you do not trigger the rebase action". Which is quite natural, but it is different from what you wrote above, isn't it?

When people say "the default for `--rebase` is false", they mean this:

    I can say "git pull --rebase=<kind>" to specify how my current
    branch is rebased on top of the upstream.  But if I do not
    specify the <kind>, i.e. "git pull --rebase", the command will
    act as if I gave 'false' as the <kind>.
At least, I would think that is what the word "default" means.

And I would be surprised if the "default" in that sense is 'false'; isn't the default <kind> 'true' --- meaning "perform the plain vanilla 'git rebase'", unless you explicitly asked for 'merges', 'interactive' or 'false'?

After the context of the hunk your patch touches, there is a description on `pull.rebase`. Down there, if you do not set `pull.rebase` or `branch.<name>.rebase` for the current branch at all, the system acts as if you had `false` for these variables. In other words, the default for these variables is `false`, meaning "do not rebase, just merge". But the default option argument for the `--rebase` option given without argument would not be `false`, I would think.

Show 19 quoted lines
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
>  Documentation/git-pull.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
> index 0e14f8b5b2..d28790388e 100644
> --- a/Documentation/git-pull.txt
> +++ b/Documentation/git-pull.txt
> @@ -116,7 +116,8 @@ When set to `merges`, rebase using `git rebase --rebase-merges` so that
>  the local merge commits are included in the rebase (see
>  linkgit:git-rebase[1] for details).
>  +
> -When false, merge the upstream branch into the current branch.
> +When false, merge the upstream branch into the current branch. This is
> +the default.
>  +
>  When `interactive`, enable the interactive mode of rebase.
>  +
Previous: Dragan SimicNext: Linus Arver
Message 2 of 8 in “doc: pull: improve rebase=false documentation”
  1. doc: pull: improve rebase=false documentationDragan Simic, Sep 14, 2023
  2. Junio C HamanoSep 14, 2023
  3. Linus ArverSep 14, 2023
  4. Dragan SimicSep 15, 2023
  5. Junio C HamanoSep 15, 2023
  6. Junio C HamanoSep 15, 2023
  7. Linus ArverSep 15, 2023
  8. Dragan SimicSep 16, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.