{"thread":{"id":"30376","subject":"git-subtree split O(N)","startedAt":"2012-05-01T01:39:20Z","lastAt":"2012-05-01T19:49:32Z","messageCount":4,"participants":["Vinnie Falco","Randal L. Schwartz","dag@cray.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"190381","messageId":"CA+EzHGfiRg+w8FsvrXEi0Yr4oVzxaZA_1JT8cmRR0YrYG7m6AQ@mail.gmail.com","threadId":"30376","inReplyTo":null,"subject":"git-subtree split O(N)","fromName":"Vinnie Falco","fromEmail":"vinnie.falco@gmail.com","sentAt":"2012-05-01T01:39:20Z","receivedAt":"2012-05-01T01:39:20Z","isPatch":false,"sender":{"key":"vinnie.falco@gmail.com","avatar":null},"body":"I'm using git-subtree split to extract changes to a directory\npreviously added with git-subtree add, in my local repository. The\nsplit is going into its own branch, which I then push to the upstream.\n\nThe problem is that every time I split, git-subtree starts from the\nvery beginning of the commit log and works its way forward. I thought\nthat it was only supposed to do that once, and that subsequent splits\nwould start from the last commit in the destination branch (I keep the\nsplit branch around).\n\nWhat's going on?\n\n-- \nFollow me on Github: https://github.com/vinniefalco\n"},{"id":"190386","messageId":"86aa1sr4a9.fsf@red.stonehenge.com","threadId":"30376","inReplyTo":"CA+EzHGfiRg+w8FsvrXEi0Yr4oVzxaZA_1JT8cmRR0YrYG7m6AQ@mail.gmail.com","subject":"Re: git-subtree split O(N)","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2012-05-01T03:03:42Z","receivedAt":"2012-05-01T03:03:42Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Vinnie\" == Vinnie Falco <vinnie.falco@gmail.com> writes:\n\nVinnie> I'm using git-subtree split to extract changes to a directory\nVinnie> previously added with git-subtree add, in my local repository. The\nVinnie> split is going into its own branch, which I then push to the upstream.\n\nVinnie> The problem is that every time I split, git-subtree starts from the\nVinnie> very beginning of the commit log and works its way forward. I thought\nVinnie> that it was only supposed to do that once, and that subsequent splits\nVinnie> would start from the last commit in the destination branch (I keep the\nVinnie> split branch around).\n\nAre you using -rejoin?\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nSmalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.\nSee http://methodsandmessages.posterous.com/ for Smalltalk discussion\n"},{"id":"190388","messageId":"CA+EzHGcxcKt=tmrscnJ1GtiBtTFhtVO7Ae9ndx61D9piFcnq3A@mail.gmail.com","threadId":"30376","inReplyTo":"86aa1sr4a9.fsf@red.stonehenge.com","subject":"Re: git-subtree split O(N)","fromName":"Vinnie Falco","fromEmail":"vinnie.falco@gmail.com","sentAt":"2012-05-01T03:10:07Z","receivedAt":"2012-05-01T03:10:07Z","isPatch":false,"sender":{"key":"vinnie.falco@gmail.com","avatar":null},"body":"> Vinnie> I'm using git-subtree split to extract changes to a directory\n>\n> Are you using -rejoin?\n\nI am not using --rejoin. Admittedly, the documentation is somewhat\nopaque on its usage:\n\n\"--rejoin:: This option is only valid for the split command.\"\n\nThis is confusing. One would think that an option named \"rejoin\" has\nmore to do with merge or pull than split. Although I guess the meaning\nis that you want your local changes to \"rejoin\" the upstream?\n\n\"...future splits can search only the part of history that has been\nadded since the most recent --rejoin.\"\n\nThis sounds exactly like my use-case, I want to avoid starting from\ninitial commit on a split, but...\n\n\"If you do all your merges with '--squash', don't use '--rejoin' when\nyou split, because you don't want the subproject's history to be part\nof your project anyway.\"\n\nI always use --squash with git-subtree pull, so I interpreted this to\nmean I should never use --rejoin.\n\n\"Unfortunately, using this option results in 'git log' showing an\nextra copy of every new commit that was created\"\n\nThis is what discouraged me from ever touching \"--rejoin\"\n\nI hope this helps\n\nThanks\n"},{"id":"190470","messageId":"nnghavzu1f7.fsf@transit.us.cray.com","threadId":"30376","inReplyTo":"CA+EzHGfiRg+w8FsvrXEi0Yr4oVzxaZA_1JT8cmRR0YrYG7m6AQ@mail.gmail.com","subject":"Re: git-subtree split O(N)","fromName":"","fromEmail":"dag@cray.com","sentAt":"2012-05-01T19:49:32Z","receivedAt":"2012-05-01T19:49:32Z","isPatch":false,"sender":{"key":"dag@cray.com","avatar":null},"body":"Vinnie Falco <vinnie.falco@gmail.com> writes:\n\n> The problem is that every time I split, git-subtree starts from the\n> very beginning of the commit log and works its way forward. I thought\n> that it was only supposed to do that once, and that subsequent splits\n> would start from the last commit in the destination branch (I keep the\n> split branch around).\n>\n> What's going on?\n\nThis is an area I want to improve.\n\nYou have to use --rejoin so subtree will remember where you left off\nlast time.  I also always specify a branch name, like this:\n\ngit subtree split -P subproj --rejoin --branch=subproj-to-push\n\nI think --rejoin should probably be default but I need to understand the\ncode better to make sure.\n\nHTH.\n\n                              -Dave\n"}]}