{"thread":{"id":"16237","subject":"force a merge conflict","startedAt":"2008-11-09T15:09:49Z","lastAt":"2008-11-11T17:24:03Z","messageCount":7,"participants":["Caleb Cushing","Deskin Miller","Brett Simmers"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"95262","messageId":"81bfc67a0811090709s483506c1h6f9cb0f96216ef22@mail.gmail.com","threadId":"16237","inReplyTo":null,"subject":"force a merge conflict","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2008-11-09T15:09:49Z","receivedAt":"2008-11-09T15:09:49Z","isPatch":false,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"is there any way to force a merge conflict?\n\nthere are 2 projects which have basically diverged becoming\nincompatible, and both have updated since there common ancestry. I'm\nworking slowing on merging them back together.\n\nin this case I have a dev branch and fork branch the fork is a copy of\ndev except I committed one of the files from the fork. I need to merge\nthis file back into dev, but git thinks it's a fast forward, because\nit really is for git, in reality it isn't, both files have newer\nhistory than their common ancestry.\n\n-- \nCaleb Cushing\n"},{"id":"95273","messageId":"20081109183917.GA18415@euler","threadId":"16237","inReplyTo":"81bfc67a0811090709s483506c1h6f9cb0f96216ef22@mail.gmail.com","subject":"Re: force a merge conflict","fromName":"Deskin Miller","fromEmail":"deskinm@umich.edu","sentAt":"2008-11-09T18:39:17Z","receivedAt":"2008-11-09T18:39:17Z","isPatch":false,"sender":{"key":"deskinm@umich.edu","avatar":"https://gravatar.com/avatar/d340a0e612cdf0a79535c71863c0b4c535e9aba63b42032226ae903e638b64f9?d=mp&s=160"},"body":"On Sun, Nov 09, 2008 at 10:09:49AM -0500, Caleb Cushing wrote:\n> is there any way to force a merge conflict?\n\nI'm not sure a 'conflict' is what you want, based on what you say below;\nrather, it seems you simply want to force a 'merge commit', i.e. a commit with\nmultiple parents.\n\n> in this case I have a dev branch and fork branch the fork is a copy of\n> dev except I committed one of the files from the fork. I need to merge\n> this file back into dev, but git thinks it's a fast forward, because\n> it really is for git, in reality it isn't, both files have newer\n> history than their common ancestry.\n\ngit merge --no-ff ?\n\nHope that helps,\nDeskin Miller\n"},{"id":"95281","messageId":"81bfc67a0811091219t393ab1faj8d1c4df6de3c260c@mail.gmail.com","threadId":"16237","inReplyTo":"20081109183917.GA18415@euler","subject":"Re: force a merge conflict","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2008-11-09T20:19:57Z","receivedAt":"2008-11-09T20:19:57Z","isPatch":false,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"> I'm not sure a 'conflict' is what you want, based on what you say below;\n>  rather, it seems you simply want to force a 'merge commit', i.e. a commit with\n>  multiple parents.\n\n>\n> git merge --no-ff ?\n>\nI tried that but I don't see that it's any different than a fast\nforward in this scenario. Actually I don't see any difference between\nit and a fast-forward.\n-- \nCaleb Cushing\n"},{"id":"95282","messageId":"20081109203526.GB18415@euler","threadId":"16237","inReplyTo":"81bfc67a0811091219t393ab1faj8d1c4df6de3c260c@mail.gmail.com","subject":"Re: force a merge conflict","fromName":"Deskin Miller","fromEmail":"deskinm@umich.edu","sentAt":"2008-11-09T20:35:26Z","receivedAt":"2008-11-09T20:35:26Z","isPatch":false,"sender":{"key":"deskinm@umich.edu","avatar":"https://gravatar.com/avatar/d340a0e612cdf0a79535c71863c0b4c535e9aba63b42032226ae903e638b64f9?d=mp&s=160"},"body":"On Sun, Nov 09, 2008 at 03:19:57PM -0500, Caleb Cushing wrote:\n> > I'm not sure a 'conflict' is what you want, based on what you say below;\n> >  rather, it seems you simply want to force a 'merge commit', i.e. a commit with\n> >  multiple parents.\n> \n> >\n> > git merge --no-ff ?\n> >\n> I tried that but I don't see that it's any different than a fast\n> forward in this scenario. Actually I don't see any difference between\n> it and a fast-forward.\n\nLook at the results of 'git merge' and 'git merge --no-ff' in gitk.  Or,\ncompare the resultant sha1 for the two commit objects.  Or, look at 'git log'\nof the resulting commit objects, and look for a 'Merge:' line.\n\nDeskin Miller\n"},{"id":"95360","messageId":"e32b7bb40811101111o8c4334dj49a0c56c6dac6d15@mail.gmail.com","threadId":"16237","inReplyTo":"81bfc67a0811091219t393ab1faj8d1c4df6de3c260c@mail.gmail.com","subject":"Re: force a merge conflict","fromName":"Brett Simmers","fromEmail":"swtaarrs@gmail.com","sentAt":"2008-11-10T19:11:29Z","receivedAt":"2008-11-10T19:11:29Z","isPatch":false,"sender":{"key":"swtaarrs@gmail.com","avatar":null},"body":"> I tried that but I don't see that it's any different than a fast\n> forward in this scenario. Actually I don't see any difference between\n> it and a fast-forward.\n\nIf you want to be given a chance to edit the result before the merge\ncommit, you probably want 'git merge --no-commit'.\n\n-Brett\n"},{"id":"95465","messageId":"81bfc67a0811110910ic7f3fa7u77676961b0eac118@mail.gmail.com","threadId":"16237","inReplyTo":"e32b7bb40811101111o8c4334dj49a0c56c6dac6d15@mail.gmail.com","subject":"Re: force a merge conflict","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2008-11-11T17:10:08Z","receivedAt":"2008-11-11T17:10:08Z","isPatch":false,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"> If you want to be given a chance to edit the result before the merge\n>  commit, you probably want 'git merge --no-commit'.\n\nThat's the closest to what I need to do... unfortunately it's not what\nI need to do. Apparently I'll have to do a vimdiff outside of git\nsince git doesn't appear to be capable of doing what I need it to do.\n\n-- \nCaleb Cushing\n"},{"id":"95470","messageId":"81bfc67a0811110924y5ff6a669kee5cb33c92c6046d@mail.gmail.com","threadId":"16237","inReplyTo":"85647ef50811110914w7e1d36afh23b43b44ba0e2cf3@mail.gmail.com","subject":"Re: force a merge conflict","fromName":"Caleb Cushing","fromEmail":"xenoterracide@gmail.com","sentAt":"2008-11-11T17:24:03Z","receivedAt":"2008-11-11T17:24:03Z","isPatch":false,"sender":{"key":"xenoterracide@gmail.com","avatar":"https://gravatar.com/avatar/af3f0745dfa0ea9c4ee551d7d0a3cfe7ba8d229754c11678ab2ed23c3fa57065?d=mp&s=160"},"body":"> Is not the following option of the merge just for it?\n>\n>  --no-commit\n>     Perform the merge but pretend the merge failed and do not\n>  autocommit, to give the user a chance to inspect and further tweak the\n>  merge result before committing.\n\nyes and no... it doesn't auto-magically allow me to do what  a merge\nconflict does. which is put together a diff. all it really did was not\ncommit the auto merge.\n\nas far as --no-ff I'm not saying it commits the same way but I didn't\nsee any difference in the resulting diffs, which, imho, all that\nmatters is whether the resulting merged code is correct.\n\n\n-- \nCaleb Cushing\n"}]}