git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Baumgarten <matthias.baumgarten@aixigo.com>
To: Felipe Contreras <felipe.contreras@gmail.com>,
	Elijah Newren <newren@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: pull.rebase config vs. --ff-only on command line
Date: Mon, 19 Jul 2021 16:26:29 +0200	[thread overview]
Message-ID: <fa757764-db25-849d-d8d5-e28908059f6b@aixigo.com> (raw)
In-Reply-To: <60f1c9378d5a1_3302085c@natae.notmuch>



On 7/16/21 8:00 PM, Felipe Contreras wrote:
> Matthias Baumgarten wrote:
>> On 7/16/21 6:44 PM, Felipe Contreras wrote:
>>> Elijah Newren wrote:
>>>> On Fri, Jul 16, 2021 at 7:52 AM Matthias Baumgarten
>>>> <matthias.baumgarten@aixigo.com> wrote:
>>>>> this is my first time contacting you guys and girls so I hope this mail
>>>>> achieves the expected standard. I've discovered the following behaviour
>>>>> of git:
>>>>>
>>>>> If pull.rebase is configured to true and git pull --ff-only is executed
>>>>> it seems like the config wins, i.e. issuing "Successfully rebased and
>>>>> updated refs/heads/...", which is not what I would expect. I always
>>>>> believed that command line options would overwrite configured options.
>>>>>
>>>>> Is my assumption that command line options always win wrong or is this a
>>>>> bug?
>>>>
>>>> It's a bug.
>>>
>>> No it isn't.
>>>
>>> Elijah is elevating to fact his opinion of what --ff-only should be
>>> changed to.
>>>
>>> But it has not been changed. Today --ff-only is meant only for the merge
>>> mode of `git pull`, and like other merge-only options (e.g. --ff,
>>> --no-ff, and --squash) it's ignored in the rebase mode.
>>
>> Shouldn't every explicitly given merge option (like --ff-only) overwrite
>> any configured option that would not even result in a merge, i.e.
>> forcing a merge and thus forcing ff-only?
> 
> Perhaps. Other developers have suggested that before.
> 
> The problem is that everyone wants to make --ff-only the default, and
> then we start to get into a tricky situation, because what should these
> do:
> 
>    git -c pull.ff=only pull
>    git -c pull.ff=only pull --merge
>    git -c pull.ff=only pull --rebase

If my assumption were true, and every explicit (cli given) option would 
overwrite implicitly given ones (i.e. configured options), wouldn't

  * git -c pull.ff=only pull, do a fast-forward (or merge)
  * git -c pull.ff=only pull --merge, force a merge commit
  * git -c pull.ff=only pull --rebase, force rebase

> 
> One of these will always fail, when it shouldn'tWould this even apply under the above assumption?
> 
> I proposed a solution for that, but is has been ignored.
I'm sorry!
> 



-- 
aixigo AG
Karl-Friedrich-Str. 68, 52072 Aachen, Germany
phone: +49 (0)241 559709-390, fax: +49 (0)241 559709-99
email: matthias.baumgarten@aixigo.com
web: https://www.aixigo.com
District Court Aachen – HRB 8057
Board: Christian Friedrich, Tobias Haustein
Chairman of the Supervisory Board: Dr. Roland Schlager

  reply	other threads:[~2021-07-19 14:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 14:43 pull.rebase config vs. --ff-only on command line Matthias Baumgarten
2021-07-16 15:03 ` Elijah Newren
2021-07-16 16:44   ` Felipe Contreras
2021-07-16 16:54     ` Matthias Baumgarten
2021-07-16 18:00       ` Felipe Contreras
2021-07-19 14:26         ` Matthias Baumgarten [this message]
2021-07-19 17:43           ` Felipe Contreras
2021-07-22 18:57           ` Junio C Hamano
2021-07-22 22:09             ` Felipe Contreras
2021-07-23  9:36             ` Matthias Baumgarten
2021-07-16 16:39 ` 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=fa757764-db25-849d-d8d5-e28908059f6b@aixigo.com \
    --to=matthias.baumgarten@aixigo.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.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).