{"thread":{"id":"35719","subject":"Re: [PATCH 1/4] subtree: support split --rejoin --squash","startedAt":"2014-01-23T03:59:23Z","lastAt":"2014-01-23T14:42:37Z","messageCount":3,"participants":["Matthew Ogilvie","Pierre Penninckx"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"233586","messageId":"20140123035923.GA4176@comcast.net","threadId":"35719","inReplyTo":"CAMzgWy18wH4_Ds00x7UASQjLgN8LiEucFSZFp-5PJio_pEwmnA@mail.gmail.com","subject":"Re: [PATCH 1/4] subtree: support split --rejoin --squash","fromName":"Matthew Ogilvie","fromEmail":"mmogilvi_git@miniinfo.net","sentAt":"2014-01-23T03:59:23Z","receivedAt":"2014-01-23T03:59:23Z","isPatch":true,"sender":{"key":"mmogilvi_git@miniinfo.net","avatar":null},"body":"On Wed, Jan 22, 2014 at 03:58:28PM +0100, Pierre Penninckx wrote:\n> 2013/12/7 Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n> > Subject: [PATCH 1/4] subtree: support split --rejoin --squash\n> >\n> > Allow using --squash with \"git subtree split --rejoin\".  It\n> > will still split off (and save to --branch) the complete\n> > subtree history, but the merge done for the \"--rejoin\" will\n> > be merging a squashed representation of the new subtree\n> > commits, instead of the commits themselves (similar to\n> > how \"git subtree merge --squash\" works).\n> >\n> > Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n> > ---\n> >\n> > I can think of a couple of possible objections to this patch.\n> > Are these (or any others) worth fixing?\n> >\n> > 1. Perhaps someone want the saved subtree (--branch) to have\n> >    a squashed representation as well, as an option?  Maybe we\n> >    need two different --squash options?  Something\n> >    like \"--rejoin-squash\"?\n> > 2. It could definitely use some automated tests.  In fact,\n> >    pre-existing --squash functionality is hardly tested at\n> >    all, either.\n> >       See patch 4 comments for a script I use to help with\n> >    mostly-manual testing.\n>\n> Sorry to bother you with this again, but I was wondering if those patches\n> would be integrated into git anytime soon.\n> And if not, if there is something I can do to help.\n> \n> I found them by the way, thanks a lot!\n> \n> Pierre\n\nI'm not sure when or if the patches will make it in.  Junio's\nweekly \"What's cooking...\" email has asked for \"Comments?\" about\nthem for the past several weeks, but I have yet to see\nanyone actually comment about them.\n\nSearching throught the last couple of years of mailing list\narchives for \"subtree\" reveals a general lack of a active\nmaintainer(s) to help review and improve patches for \"git\nsubtree\".  Given the general lack of help and feedback, it is\nunderstandable that Junio has largely limited inclusion of\nsubtree patches to trivially obvious bug fixes.\n\n                        - Matthew Ogilvie\n"},{"id":"233591","messageId":"CAMzgWy3pfmESX1uvU2=nUtr1AdEVhtw-fXPwdtkNk4U6G4DCoA@mail.gmail.com","threadId":"35719","inReplyTo":"20140123035923.GA4176@comcast.net","subject":"Re: [PATCH 1/4] subtree: support split --rejoin --squash","fromName":"Pierre Penninckx","fromEmail":"ibizapeanut@gmail.com","sentAt":"2014-01-23T08:51:49Z","receivedAt":"2014-01-23T08:51:49Z","isPatch":true,"sender":{"key":"ibizapeanut@gmail.com","avatar":"https://gravatar.com/avatar/1f166bda099816b4474d218fe080220f5a4c6f11b85c67165d7cb2904cd5fe86?d=mp&s=160"},"body":"Hi again,\n\nAfter using the patched git-subtree (with patches 1 to 3) for a while,\nI suspect the added functionality does not do exactly what I wanted.\nSo yes, now when doing a rejoin, the squash of the split commits is\nused. But how can I push this squash instead of the individual\ncommits? The problem is I don't know how to reference that squashed\ncommit.\n\nI tried adding the --branch option but it adds the branch to the top\nof the individual commits so no luck there.\nThis is maybe obvious but I'm not at ease with commit references in git.\n\nPierre\n\n2014/1/23 Matthew Ogilvie <mmogilvi_git@miniinfo.net>:\n> On Wed, Jan 22, 2014 at 03:58:28PM +0100, Pierre Penninckx wrote:\n>> 2013/12/7 Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n>> > Subject: [PATCH 1/4] subtree: support split --rejoin --squash\n>> >\n>> > Allow using --squash with \"git subtree split --rejoin\".  It\n>> > will still split off (and save to --branch) the complete\n>> > subtree history, but the merge done for the \"--rejoin\" will\n>> > be merging a squashed representation of the new subtree\n>> > commits, instead of the commits themselves (similar to\n>> > how \"git subtree merge --squash\" works).\n>> >\n>> > Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n>> > ---\n>> >\n>> > I can think of a couple of possible objections to this patch.\n>> > Are these (or any others) worth fixing?\n>> >\n>> > 1. Perhaps someone want the saved subtree (--branch) to have\n>> >    a squashed representation as well, as an option?  Maybe we\n>> >    need two different --squash options?  Something\n>> >    like \"--rejoin-squash\"?\n>> > 2. It could definitely use some automated tests.  In fact,\n>> >    pre-existing --squash functionality is hardly tested at\n>> >    all, either.\n>> >       See patch 4 comments for a script I use to help with\n>> >    mostly-manual testing.\n>>\n>> Sorry to bother you with this again, but I was wondering if those patches\n>> would be integrated into git anytime soon.\n>> And if not, if there is something I can do to help.\n>>\n>> I found them by the way, thanks a lot!\n>>\n>> Pierre\n>\n> I'm not sure when or if the patches will make it in.  Junio's\n> weekly \"What's cooking...\" email has asked for \"Comments?\" about\n> them for the past several weeks, but I have yet to see\n> anyone actually comment about them.\n>\n> Searching throught the last couple of years of mailing list\n> archives for \"subtree\" reveals a general lack of a active\n> maintainer(s) to help review and improve patches for \"git\n> subtree\".  Given the general lack of help and feedback, it is\n> understandable that Junio has largely limited inclusion of\n> subtree patches to trivially obvious bug fixes.\n>\n>                         - Matthew Ogilvie\n"},{"id":"233598","messageId":"20140123144237.GA2732@comcast.net","threadId":"35719","inReplyTo":"CAMzgWy3pfmESX1uvU2=nUtr1AdEVhtw-fXPwdtkNk4U6G4DCoA@mail.gmail.com","subject":"Re: [PATCH 1/4] subtree: support split --rejoin --squash","fromName":"Matthew Ogilvie","fromEmail":"mmogilvi_git@miniinfo.net","sentAt":"2014-01-23T14:42:37Z","receivedAt":"2014-01-23T14:42:37Z","isPatch":true,"sender":{"key":"mmogilvi_git@miniinfo.net","avatar":null},"body":"On Thu, Jan 23, 2014 at 09:51:49AM +0100, Pierre Penninckx wrote:\n> Hi again,\n> \n> After using the patched git-subtree (with patches 1 to 3) for a while,\n> I suspect the added functionality does not do exactly what I wanted.\n> So yes, now when doing a rejoin, the squash of the split commits is\n> used. But how can I push this squash instead of the individual\n> commits? The problem is I don't know how to reference that squashed\n> commit.\n> \n> I tried adding the --branch option but it adds the branch to the top\n> of the individual commits so no luck there.\n> This is maybe obvious but I'm not at ease with commit references in git.\n\nNote that there are essentially two trees output by subtree --join.\n\nThe first output is the main branch (with --join).  With my\npatches and --squash, the main branch merges in a squashed\nrepresentation of the subtree changes, so that the main\nproject history doesn't have two copies of potentially\ntons of different commits in it's history (the\noriginal and the subtree, shown merged together).\n\nThe second output is the new branch tip of the subtree itself.\nMy patch always outputs the full history of the subtree, not\na squashed representation.  This is what's different from your\npatch, and is what I wanted.  If you want this subtree output\nto ALSO be squashed, then it would need another option to\nsupport this.\n\nNote that there is at least one technical reason to prefer my\nstrategy.  \"git subtree\" tries to make it so you can\nre-run it (potentially from scratch) on the main project at\nany point in time, and re-generate exactly the same final\nsubtree history, regardless of previous runs of \"git subtree\".\nBut if some of that history was originally squashed, it currently\nhas no way of knowing which commits should be squashed together\nto properly regenerate exactly the same subtree history.\nThis is especially true if you use \"--ignore-joins\", which\nis currently the only practical workaround to the bug described\nin my patch 4 (about merging in history that originally branched\noff before the previous subtree split point).  Perhaps this\nissue could be addressed by enhancing subtree to recognize\nspecially-formatted squash messages, and intentionally\nregenerate the squashed based on them?\n\n[Side note: I think the convention on this list is to respond\ninline or after the previous message, not at the top, so new\npeople can more easily pick up the discussion.]\n\n                       - Matthew\n\n> 2014/1/23 Matthew Ogilvie <mmogilvi_git@miniinfo.net>:\n> > On Wed, Jan 22, 2014 at 03:58:28PM +0100, Pierre Penninckx wrote:\n> >> 2013/12/7 Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n> >> > Subject: [PATCH 1/4] subtree: support split --rejoin --squash\n> >> >\n> >> > Allow using --squash with \"git subtree split --rejoin\".  It\n> >> > will still split off (and save to --branch) the complete\n> >> > subtree history, but the merge done for the \"--rejoin\" will\n> >> > be merging a squashed representation of the new subtree\n> >> > commits, instead of the commits themselves (similar to\n> >> > how \"git subtree merge --squash\" works).\n> >> >\n> >> > Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>\n> >> > ---\n> >> >\n> >> > I can think of a couple of possible objections to this patch.\n> >> > Are these (or any others) worth fixing?\n> >> >\n> >> > 1. Perhaps someone want the saved subtree (--branch) to have\n> >> >    a squashed representation as well, as an option?  Maybe we\n> >> >    need two different --squash options?  Something\n> >> >    like \"--rejoin-squash\"?\n> >> > 2. It could definitely use some automated tests.  In fact,\n> >> >    pre-existing --squash functionality is hardly tested at\n> >> >    all, either.\n> >> >       See patch 4 comments for a script I use to help with\n> >> >    mostly-manual testing.\n> >>\n> >> Sorry to bother you with this again, but I was wondering if those patches\n> >> would be integrated into git anytime soon.\n> >> And if not, if there is something I can do to help.\n> >>\n> >> I found them by the way, thanks a lot!\n> >>\n> >> Pierre\n> >\n> > I'm not sure when or if the patches will make it in.  Junio's\n> > weekly \"What's cooking...\" email has asked for \"Comments?\" about\n> > them for the past several weeks, but I have yet to see\n> > anyone actually comment about them.\n> >\n> > Searching throught the last couple of years of mailing list\n> > archives for \"subtree\" reveals a general lack of a active\n> > maintainer(s) to help review and improve patches for \"git\n> > subtree\".  Given the general lack of help and feedback, it is\n> > understandable that Junio has largely limited inclusion of\n> > subtree patches to trivially obvious bug fixes.\n> >\n> >                         - Matthew Ogilvie\n"}]}