Subject: Re: git pull --ff-only errors when git merge --ff-only passes

From: Junio C Hamano <[email-masked]>
Date: Mon, 03 Jun 2024 08:31:02 -0700

Arundas T C <[email-masked]> writes:

> What happened instead? (Actual behavior)
>
> error: cannot pull with rebase: You have unstaged changes.
> error: Please commit or stash them.
>
> What's different between what you expected and what actually happened?
>
> It errored out because of unstaged changes, even though doing `git
> merge --ff-only` will correctly do what's expected. See below.

But you are not doing "merge" but "rebase", according to the error
message.  "pull" was told to do "rebase" instead of "merge" and it
stopped because it did not want to clobber the local changes.  So
it appears that what "merge --ff-only" would have do has very little
to do with what "pull --ff-only" you configured would do, no?