git subtree pull fails with gitconfig merge ff = only
- From
- Tyson Holub <tyson@gozynta.com>
- Date
- Apr 14, 2022, 19:32 UTC
- Message-ID
- <CAFboxAHGKGTSbyFaFjPCjnTMzz+N=jhX19_zoexC6U=pCLCeXQ@mail.gmail.com>
Hi,
Please see the bug report below.
Thanks, Tyson
Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
update ~/.gitconfig with
[merge]
ff = onlyadd git subtree to repo git subtree add --prefix subtree-path git@gitlab.com:some-repo.git main --squash
push new commit to git@gitlab.com:some-repo.git
try to pull subtree commit $ git subtree pull --prefix subtree-path git@gitlab.com:some-repo.git main --squash From gitlab.com:some-repo * branch main -> FETCH_HEAD fatal: Not possible to fast-forward, aborting.
What did you expect to happen? (Expected behavior) expect git subtree to be able to merge even if default option is ff, or provide git subtree pull with a --no-ff override
What happened instead? (Actual behavior) subtree updates do not seem possible to pull with merge ff = only
What's different between what you expected and what actually happened? subtree pull doesn't work
Anything else you want to add: git subtree works after removing merge ff = only
Please review the rest of the bug report below. You can delete any lines you don't wish to share.
[System Info] git version: git version 2.35.3 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.16.11-76051611-generic #202202230823~1646248261~21.10~2b22243 SMP PREEMPT Wed Mar 2 20: x86_64 compiler info: gnuc: 11.2 libc info: glibc: 2.34 $SHELL (typically, interactive shell): /bin/bash
[Enabled Hooks] pre-commit