{"thread":{"id":"2418","subject":"Do I misunderstand cg-merge --squash option","startedAt":"2005-11-10T00:25:05Z","lastAt":"2005-11-10T21:16:37Z","messageCount":6,"participants":["Alan Chandler","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"11445","messageId":"200511100025.05993.alan@chandlerfamily.org.uk","threadId":"2418","inReplyTo":null,"subject":"Do I misunderstand cg-merge --squash option","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-10T00:25:05Z","receivedAt":"2005-11-10T00:25:05Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"I am trying to take my current development repository which has several \nhundred commits in it as I was developing my application and make a \nsimplified branch for pushing to my public repository.\n\nI basically created a new branch (public) from the tag at the point where I \nstarted the repository.\n\ngit-checkout -b public initial_commit\n\nI then did a merge\n\ncg-merge --squash v1.0\n\nThis seemed to work fine (although it had trouble prompting me with an open \neditor to edit the commit message)\n\nBut I don't know how to move forward and merge in changes after my v1.0 tag.  \nAny attempt to merge anything else into this \"public\" branch seems to throw \nup what appears to be merge conflict, but I can't see why - when I look at \nthe results one side has extra lines, but there is no other overlap.\n\n\n\n\n\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"11468","messageId":"20051110101206.GP30496@pasky.or.cz","threadId":"2418","inReplyTo":"200511100025.05993.alan@chandlerfamily.org.uk","subject":"Re: Do I misunderstand cg-merge --squash option","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-10T10:12:06Z","receivedAt":"2005-11-10T10:12:06Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Nov 10, 2005 at 01:25:05AM CET, I got a letter\nwhere Alan Chandler <alan@chandlerfamily.org.uk> said that...\n> I am trying to take my current development repository which has several \n> hundred commits in it as I was developing my application and make a \n> simplified branch for pushing to my public repository.\n> \n> I basically created a new branch (public) from the tag at the point where I \n> started the repository.\n> \n> git-checkout -b public initial_commit\n> \n> I then did a merge\n> \n> cg-merge --squash v1.0\n\nWhy do you want to do a squash merge?\n\n> But I don't know how to move forward and merge in changes after my v1.0 tag.  \n> Any attempt to merge anything else into this \"public\" branch seems to throw \n> up what appears to be merge conflict, but I can't see why - when I look at \n> the results one side has extra lines, but there is no other overlap.\n\nI told you in the documentation - \"re-merging with that branch later\nwill cause trouble\". If you want to be able to re-merge the branch\nlater, you shouldn't use squash merge. And you shouldn't use squash\nmerge anyway, expect for few narrow use cases.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11497","messageId":"200511101915.53736.alan@chandlerfamily.org.uk","threadId":"2418","inReplyTo":"20051110101206.GP30496@pasky.or.cz","subject":"Re: Do I misunderstand cg-merge --squash option","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-10T19:15:53Z","receivedAt":"2005-11-10T19:15:53Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Thursday 10 Nov 2005 10:12, Petr Baudis wrote:\n\n>\n> Why do you want to do a squash merge?\n>\n\nI used git experimentally as I built a web application from scratch, learning \nboth what I wanted the application to look like and how to do it with the \npackages I was using.  There is several hundreds of commits that are totally \nirrelevant (both because they were all different directions I was trying and \nthen backing out of and because I saved state just were I was when I gave up \nfor the day).\n\nSo what I was experimenting with was whether I could somehow get rid of that \nhistory (at least in one branch) before making that history public.\n\n\n>\n> I told you in the documentation - \"re-merging with that branch later\n> will cause trouble\". If you want to be able to re-merge the branch\n> later, you shouldn't use squash merge. And you shouldn't use squash\n> merge anyway, expect for few narrow use cases.\n\nI know - I saw the warning - and I was only experimenting.  I just didn't \nunderstand what had happened.\n\nI am now experimenting with another approach using grafts etc.  But I will \npost on that seperately, so as not to confuse titles of the e-mail thread.\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"11499","messageId":"20051110192923.GT30496@pasky.or.cz","threadId":"2418","inReplyTo":"200511101915.53736.alan@chandlerfamily.org.uk","subject":"Re: Do I misunderstand cg-merge --squash option","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-10T19:29:23Z","receivedAt":"2005-11-10T19:29:23Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Nov 10, 2005 at 08:15:53PM CET, I got a letter\nwhere Alan Chandler <alan@chandlerfamily.org.uk> said that...\n> On Thursday 10 Nov 2005 10:12, Petr Baudis wrote:\n> > Why do you want to do a squash merge?\n> \n> I used git experimentally as I built a web application from scratch, learning \n> both what I wanted the application to look like and how to do it with the \n> packages I was using.  There is several hundreds of commits that are totally \n> irrelevant (both because they were all different directions I was trying and \n> then backing out of and because I saved state just were I was when I gave up \n> for the day).\n> \n> So what I was experimenting with was whether I could somehow get rid of that \n> history (at least in one branch) before making that history public.\n\nAha. That sounds reasonable.\n\n> > I told you in the documentation - \"re-merging with that branch later\n> > will cause trouble\". If you want to be able to re-merge the branch\n> > later, you shouldn't use squash merge. And you shouldn't use squash\n> > merge anyway, expect for few narrow use cases.\n> \n> I know - I saw the warning - and I was only experimenting.  I just didn't \n> understand what had happened.\n\nIf you would be doing something like this again, it's best to merge, and\nthen rather than continuing to develop what you merged, just throw that\nbranch again and re-clone the merged repository.\n\nRight now, what about trying to manually select the merge base?\n\n\tpublic$ cg-merge -b v1.0 master\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"},{"id":"11513","messageId":"200511102036.06484.alan@chandlerfamily.org.uk","threadId":"2418","inReplyTo":"20051110192923.GT30496@pasky.or.cz","subject":"Re: Do I misunderstand cg-merge --squash option","fromName":"Alan Chandler","fromEmail":"alan@chandlerfamily.org.uk","sentAt":"2005-11-10T20:36:06Z","receivedAt":"2005-11-10T20:36:06Z","isPatch":false,"sender":{"key":"alan@chandlerfamily.org.uk","avatar":"https://gravatar.com/avatar/1862247e5ea8eac114c842f9dc3a5db6253754e24ef7171757cf97eedce48b8c?d=mp&s=160"},"body":"On Thursday 10 Nov 2005 19:29, Petr Baudis wrote:\n\n>\n> Right now, what about trying to manually select the merge base?\n>\n> \tpublic$ cg-merge -b v1.0 master\n\nActually, that does merge very nicely.  However, I don't think its what I \nwant. From gitk I get both routes back to my initial commit, both the fast \ntrack one and the slow train via all stations en-route.\n\nI have had more success with grafting (which you kindly informed me about \nyesterday)\n\nsomething like\n\necho `cg-object-id v1.0` `cg-object-id initial_commit` >.git/info/grafts\n\nlf I make a branch out of the parent of v1.0 before doing this,  I end up with \nthere being a side branch of the old history and my master branch headed back \nthrough a quick route to the initial_commit.\n\nSomething strange (well actually not that unexpected, the more I think about \nit) has happened though.  \n\nI was trying to see if cg-clone would effectively me make a new repository \nwithout the grafts in it (ie with real commit object with a parent as \nspecified via the graft) but it doesn't - it just looses the graft and \nrebrings all the old history back in\n\nIs that a bug?\n\n-- \nAlan Chandler\nhttp://www.chandlerfamily.org.uk\nOpen Source. It's the difference between trust and antitrust.\n"},{"id":"11519","messageId":"20051110211637.GA30496@pasky.or.cz","threadId":"2418","inReplyTo":"200511102036.06484.alan@chandlerfamily.org.uk","subject":"Re: Do I misunderstand cg-merge --squash option","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-11-10T21:16:37Z","receivedAt":"2005-11-10T21:16:37Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Thu, Nov 10, 2005 at 09:36:06PM CET, I got a letter\nwhere Alan Chandler <alan@chandlerfamily.org.uk> said that...\n> On Thursday 10 Nov 2005 19:29, Petr Baudis wrote:\n> \n> >\n> > Right now, what about trying to manually select the merge base?\n> >\n> > \tpublic$ cg-merge -b v1.0 master\n> \n> Actually, that does merge very nicely.  However, I don't think its what I \n> want. From gitk I get both routes back to my initial commit, both the fast \n> track one and the slow train via all stations en-route.\n> \n> I have had more success with grafting (which you kindly informed me about \n> yesterday)\n> \n> something like\n> \n> echo `cg-object-id v1.0` `cg-object-id initial_commit` >.git/info/grafts\n> \n> lf I make a branch out of the parent of v1.0 before doing this,  I end up with \n> there being a side branch of the old history and my master branch headed back \n> through a quick route to the initial_commit.\n\nHuh. But you still have the history cluttered and both routes to your\ninitial commit, don't you? I'm now confused - I fear I don't know what\nyou want anymore. But well, whatever is working out for you... ;-)\n\n> Something strange (well actually not that unexpected, the more I think about \n> it) has happened though.  \n> \n> I was trying to see if cg-clone would effectively me make a new repository \n> without the grafts in it (ie with real commit object with a parent as \n> specified via the graft) but it doesn't - it just looses the graft and \n> rebrings all the old history back in\n> \n> Is that a bug?\n\nSo far grafts were considered a private thing to enable some cool things\nlike tying ancient history to your current history tree, etc. But if you\nwant to do some persistent changes in the DAG, you are really best off\njust rebuilding the whole history.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nVI has two modes: the one in which it beeps and the one in which\nit doesn't.\n"}]}