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

Re: git-subtree.sh - regression introduced by da949cc55

From
Jakub Suder <jakub.suder@gmail.com>
Date
Feb 13, 2010, 19:41 UTC
Message-ID
<508e1531002131141o32fdc555keb31a3d8b05d7109@mail.gmail.com>
In-Reply-To
<32541b131002120952gcb5116as730fff8bdcf005c1@mail.gmail.com>
On Fri, Feb 12, 2010 at 18:52, Avery Pennarun <apenwarr@gmail.com> wrote:
> Did you have a chance to look at this?

It's true, when you try to extract a subproject from an ordinary directory of a project, using git subtree split, it builds the new branch on top of some past commit, instead of as a completely separate timeline, and it's exactly because of my change. The problem lies in what you wrote in the comment above that fragment: "ugly. is there no better way to tell if this is a subtree vs. a mainline commit? Does it matter?" - well, apparently it does matter :) That line fixed my problem, because commits in the subproject's timeline should have cache set to themselves, but it the case when you start from the other side (first subtree split, not first subtree add), in this fragment the first commits from the mainline (which are unrelated to the subdirectory) are regarded as subtree commits, because $tree is empty (but not because the root directory is different, only because it just didn't exist yet at this point).

We just need some different way of determining if this is a commit from subtree timeline or the main timeline - I'll see if I can come up with something...

JS
Previous: Avery PennarunNext: Avery Pennarun
Message 4 of 5 in “git-subtree.sh - regression introduced by da949cc55”
  1. Marc FournierFeb 11, 2010
  2. Jakub SuderFeb 11, 2010
  3. Avery PennarunFeb 12, 2010
  4. Jakub SuderFeb 13, 2010
  5. Avery PennarunFeb 13, 2010

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.