{"thread":{"id":"63770","subject":"git-subtree documentation fix request: split example causes fatal error","startedAt":"2025-07-09T11:05:33Z","lastAt":"2025-07-09T16:33:53Z","messageCount":2,"participants":["Alexander Krupp","Marc Branchaud"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"521647","messageId":"6907e423-324f-459f-a62e-fe6be14f4f73@akr.yagii.de","threadId":"63770","inReplyTo":null,"subject":"git-subtree documentation fix request: split example causes fatal error","fromName":"Alexander Krupp","fromEmail":"obs@akr.yagii.de","sentAt":"2025-07-09T11:01:28Z","receivedAt":"2025-07-09T11:05:33Z","isPatch":false,"sender":{"key":"obs@akr.yagii.de","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nRead the documentation on git-subtree and try it:\n\n > git clone git://git.kernel.org/pub/scm/git/git.git test-git\nCloning into 'test-git'...\nremote: Enumerating objects: 392367, done.\nremote: Counting objects: 100% (7710/7710), done.\nremote: Compressing objects: 100% (1126/1126), done.\nremote: Total 392367 (delta 7015), reused 7002 (delta 6575), pack-reused \n384657\nReceiving objects: 100% (392367/392367), 131.92 MiB | 49.57 MiB/s, done.\nResolving deltas: 100% (296075/296075), done.\n > cd test-git/\n > git subtree split --prefix=gitweb --annotate='(split) ' \\\n >                      0a8f4f0^.. --onto=1130ef3 --rejoin \\\n >                      --branch gitweb-latest\nfatal: '0a8f4f0^..' does not refer to a commit\n >\n\nWhat did you expect to happen? (Expected behavior)\n\nExample should work as documented.\n\nWhat happened instead? (Actual behavior)\n\nsee above.\n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nRecommend a fix of the documentation. Due to lack of experience with \nsubtree I cannot provide.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.43.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.4.0-150600.23.50-default #1 SMP PREEMPT_DYNAMIC Fri May  \n9 22:09:52 UTC 2025 (dee422c) x86_64\ncompiler info: gnuc: 7.5\nlibc info: glibc: 2.38\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nRead the documentation on git-subtree and try it:\n\n> git clone git://git.kernel.org/pub/scm/git/git.git test-git\nCloning into 'test-git'...\nremote: Enumerating objects: 392367, done.\nremote: Counting objects: 100% (7710/7710), done.\nremote: Compressing objects: 100% (1126/1126), done.\nremote: Total 392367 (delta 7015), reused 7002 (delta 6575), pack-reused 384657\nReceiving objects: 100% (392367/392367), 131.92 MiB | 49.57 MiB/s, done.\nResolving deltas: 100% (296075/296075), done.\n> cd test-git/\n> git subtree split --prefix=gitweb --annotate='(split) ' \\\n>                      0a8f4f0^.. --onto=1130ef3 --rejoin \\\n>                      --branch gitweb-latest\nfatal: '0a8f4f0^..' does not refer to a commit\n>\n\nWhat did you expect to happen? (Expected behavior)\n\nExample should work as documented.\n\nWhat happened instead? (Actual behavior)\n\nsee above.\n\nWhat's different between what you expected and what actually happened?\n\nAnything else you want to add:\n\nRecommend a fix of the documentation. Due to lack of experience with subtree I cannot provide.\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.43.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.4.0-150600.23.50-default #1 SMP PREEMPT_DYNAMIC Fri May  9 22:09:52 UTC 2025 (dee422c) x86_64\ncompiler info: gnuc: 7.5\nlibc info: glibc: 2.38\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n"},{"id":"521704","messageId":"44b6c207-b02b-401a-a621-f4023e780240@xiplink.com","threadId":"63770","inReplyTo":"6907e423-324f-459f-a62e-fe6be14f4f73@akr.yagii.de","subject":"Re: git-subtree documentation fix request: split example causes fatal error","fromName":"Marc Branchaud","fromEmail":"marcnarc@xiplink.com","sentAt":"2025-07-09T16:33:49Z","receivedAt":"2025-07-09T16:33:53Z","isPatch":false,"sender":{"key":"marcnarc@xiplink.com","avatar":"https://avatars.githubusercontent.com/u/14980203?v=4"},"body":"\nOn 2025-07-09 07:01, Alexander Krupp wrote:\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n> \n> What did you do before the bug happened? (Steps to reproduce your issue)\n> \n> Read the documentation on git-subtree and try it:\n> \n>  > git clone git://git.kernel.org/pub/scm/git/git.git test-git\n> Cloning into 'test-git'...\n> remote: Enumerating objects: 392367, done.\n> remote: Counting objects: 100% (7710/7710), done.\n> remote: Compressing objects: 100% (1126/1126), done.\n> remote: Total 392367 (delta 7015), reused 7002 (delta 6575), pack-reused \n> 384657\n> Receiving objects: 100% (392367/392367), 131.92 MiB | 49.57 MiB/s, done.\n> Resolving deltas: 100% (296075/296075), done.\n>  > cd test-git/\n>  > git subtree split --prefix=gitweb --annotate='(split) ' \\\n>  >                      0a8f4f0^.. --onto=1130ef3 --rejoin \\\n>  >                      --branch gitweb-latest\n> fatal: '0a8f4f0^..' does not refer to a commit\n>  >\n\nThanks for reporting this!  I also just ran into it when following \nsubtree's documentation.\n\nThe problem stems from this:\n\tgit rev-parse -q --verify \"$1^{commit}\" >/dev/null ||\n\t\tdie \"fatal: '$1' does not refer to a commit\"\n\nHere, $1 is the \"0a8f4f0^..\" part.\n\nI then tried removing the \"..\", which lets the command run but then I \nended up with an empty result.  Not sure why that happens, though.\n\nI've CC'd subtree's author, Avery (as identified in \ncontrib/subtree/README), and David, who added this check long ago \n(commit 10a49587fab).\n\n\t\tM.\n\n> What did you expect to happen? (Expected behavior)\n> \n> Example should work as documented.\n> \n> What happened instead? (Actual behavior)\n> \n> see above.\n> \n> What's different between what you expected and what actually happened?\n> \n> Anything else you want to add:\n> \n> Recommend a fix of the documentation. Due to lack of experience with \n> subtree I cannot provide.\n> \n> Please review the rest of the bug report below.\n> You can delete any lines you don't wish to share.\n> \n> \n> [System Info]\n> git version:\n> git version 2.43.0\n> cpu: x86_64\n> no commit associated with this build\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> uname: Linux 6.4.0-150600.23.50-default #1 SMP PREEMPT_DYNAMIC Fri May 9 \n> 22:09:52 UTC 2025 (dee422c) x86_64\n> compiler info: gnuc: 7.5\n> libc info: glibc: 2.38\n> $SHELL (typically, interactive shell): /bin/bash\n> \n> \n> [Enabled Hooks]\n\n"}]}