Git development
 help / color / mirror / Atom feed
* [Bug] Git subtree regression
@ 2025-12-26 19:58 dev
  2025-12-30 17:07 ` george
  0 siblings, 1 reply; 11+ messages in thread
From: dev @ 2025-12-26 19:58 UTC (permalink / raw)
  To: git

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)

I use git subtrees to manage the monorepo `https://github.com/athena-framework/athena`.
When using git 2.52.0, I can add a new remote for say the `clock` component via `git remote add clock git@github.com:athena-framework/clock.git`
Then do a `subtree push` via `git subtree push --prefix="src/components/clock" "clock" master`.

What did you expect to happen? (Expected behavior)

I expected it to work and say `Everything up-to-date`, because it is up to date.

What happened instead? (Actual behavior)

It fails because of:

```
To github.com:athena-framework/clock.git
 ! [rejected]        0efb3d9858e3bfee65165508aeeacc50417c9a99 -> master (non-fast-forward)
error: failed to push some refs to 'github.com:athena-framework/clock.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
```

What's different between what you expected and what actually happened?

Seems to be a regression of https://github.com/git/git/commit/83f9dad7d6fb5988b68f80b25bd87c68693195dd as it used to work and now it doesn't.

Anything else you want to add:

I did some initial exploration and it might have something to do with the `clock` component originally being added via `git subtree add --squash`.
For another component:

- git 2.51.1: split produces 92 commits, properly connected to original repo history
- git 2.52.0: split produces 8 commits, disconnected history with a new root

The `git-subtree-split:` marker in the squash commit body doesn't seem to be honored in 2.52.0.

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.52.0
cpu: x86_64
built from commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
rust: enabled
libcurl: 8.17.0
OpenSSL: OpenSSL 3.6.0 1 Oct 2025
zlib-ng: 2.2.5
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 6.18.2-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 18 Dec 2025 18:00:18 +0000 x86_64
compiler info: gnuc: 15.2
libc info: glibc: 2.42
$SHELL (typically, interactive shell): /bin/bash



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-02-18  4:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-26 19:58 [Bug] Git subtree regression dev
2025-12-30 17:07 ` george
2026-01-04  4:52   ` Colin Stagner
2026-01-04 14:27     ` george
2026-01-05  3:36       ` Colin Stagner
2026-01-06  4:55         ` george
2026-01-10  1:25           ` Colin Stagner
2026-01-10 17:22             ` george
2026-02-15 20:36               ` Colin Stagner
2026-02-16 21:25                 ` D. Ben Knoble
2026-02-18  4:29                 ` george

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox