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

subtree split fails to remove not relevant commits

From
КРКирилл Росколий <kirill.roskolii@gmail.com>
Date
Mar 21, 2022, 09:36 UTC
Message-ID
<CAMutOmEVw1Y1XA665EYW+F6tgw5fBdwnCroGakfoOEQ0kbxQJw@mail.gmail.com>
Hello,
What did you do before the bug happened? (Steps to reproduce your issue)

`git subtree split --prefix=${project_path} --branch=${BRANCH}` . As part of the parent project we developed a couple smaller ones. Now it was time to release them separately. Most splitted as expected - first commit in the history was about creating a sub-directory. One sub-project has an issue - history wasn't erased, it contained full parent project history, and only commits starting from creation of the sub-directory have "contents" changed.

What did you expect to happen? (Expected behavior)

When I do "git log --oneline -- $path-to-usb-directory" I have 21 commits in the history, so I expect to receive this history in the resulting, filtered, repository.

What happened instead? (Actual behavior)

Full history of the parent project is visible. Originally encountered on 2.17.1. Then replicated on 2.25.0 and the one below.

At the moment the parent repository is not publicly accessible, but I can share it if this will be useful for debugging. It also has the script that splits sub-projects.

[System Info] git version: git version 2.35.1 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.4.0-104-generic #118~18.04.1-Ubuntu SMP Thu Mar 3 13:53:15 UTC 2022 x86_64 compiler info: gnuc: 7.5 libc info: glibc: 2.27 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]
-- 
Kirill Roskolii
-----------------------------------------------
Mobile: 021 088 11055
Signal:  021 088 11055
GPG: 0xC675DFFBEE30974D4E478095A96816DD0EC7FEA1
Message 1 of 1 in “subtree split fails to remove not relevant commits”
  1. Кирилл РосколийMar 21, 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.