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

git subtree pull fails with gitconfig merge ff = only

From
THTyson 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 = only
add 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

Message 1 of 1 in “git subtree pull fails with gitconfig merge ff = only”
  1. Tyson HolubApr 14, 2022

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.