{"thread":{"id":"21760","subject":"Merge priority","startedAt":"2009-11-26T12:44:16Z","lastAt":"2009-11-26T19:47:12Z","messageCount":4,"participants":["Howard Miller","Alex Riesen","Martin Langhoff","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128457","messageId":"26ae428a0911260444j45437a92r47d7f2e8b292829e@mail.gmail.com","threadId":"21760","inReplyTo":null,"subject":"Merge priority","fromName":"Howard Miller","fromEmail":"howard@e-learndesign.co.uk","sentAt":"2009-11-26T12:44:16Z","receivedAt":"2009-11-26T12:44:16Z","isPatch":false,"sender":{"key":"howard@e-learndesign.co.uk","avatar":"https://gravatar.com/avatar/ddb66c6a4a077e52b823ac5b04f33ab927cb90e2ab1eafedaeba07b1920bb99e?d=mp&s=160"},"body":"I'm not sure this is even a sensible question....\n\nI have a whole bunch of customer branches with all manner of local\ntweaks and modifications. I also have a stable branch with all my\nsecurity patches and bug fixes. They do share common ancestry.\n\nI now want to update all my customer branches with the latest fixes\nand patches. Naively, I would just check out each branch and merge the\nstable branch - job done. However, is it sensible to ask if there is a\nway to say that the stable branch is more important if there are\nconflicts. Or should I be using rebase instead (which I still don't\nreally understand). I'm trying to reduce my workload as there are\nloads of branches to do.\n\nCheers :-)\n"},{"id":"128472","messageId":"81b0412b0911260742l4beb2305y87c01dd61d7c2b57@mail.gmail.com","threadId":"21760","inReplyTo":"26ae428a0911260444j45437a92r47d7f2e8b292829e@mail.gmail.com","subject":"Re: Merge priority","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-11-26T15:42:42Z","receivedAt":"2009-11-26T15:42:42Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Thu, Nov 26, 2009 at 13:44, Howard Miller <howard@e-learndesign.co.uk> wrote:\n> I now want to update all my customer branches with the latest fixes\n> and patches. Naively, I would just check out each branch and merge the\n> stable branch - job done. However, is it sensible to ask if there is a\n> way to say that the stable branch is more important if there are\n> conflicts.\n\nNo, all branches are equal. Besides, are you sure it is safe to just take\nyour stable version of the code in a conflict? Maybe the stable code uses\nsomething a customer branch renamed or removed?\n\nYou can take a look at rerere, though. It should help resolving repeating\nconflicts  by recording a resolution of your choice.\n"},{"id":"128475","messageId":"46a038f90911260822x3cf5fcd1ka7e503764cae699c@mail.gmail.com","threadId":"21760","inReplyTo":"26ae428a0911260444j45437a92r47d7f2e8b292829e@mail.gmail.com","subject":"Re: Merge priority","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-11-26T16:22:20Z","receivedAt":"2009-11-26T16:22:20Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Thu, Nov 26, 2009 at 1:44 PM, Howard Miller\n<howard@e-learndesign.co.uk> wrote:\n> I now want to update all my customer branches with the latest fixes\n> and patches. Naively, I would just check out each branch and merge the\n> stable branch - job done.\n\nYep, that's what I'd do.\n\n> However, is it sensible to ask if there is a\n> way to say that the stable branch is more important if there are\n> conflicts.\n\nNot really. The git approach is to assume that... when there is a\nconflict, you must look into it. A human needs to take a decision...\n\n> Or should I be using rebase instead (which I still don't\n> really understand). I'm trying to reduce my workload as there are\n> loads of branches to do.\n\nNo, rebase will increase the load and complexity.\n\ncheers,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"128494","messageId":"7vmy295arj.fsf@alter.siamese.dyndns.org","threadId":"21760","inReplyTo":"81b0412b0911260742l4beb2305y87c01dd61d7c2b57@mail.gmail.com","subject":"Re: Merge priority","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-26T19:47:12Z","receivedAt":"2009-11-26T19:47:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> You can take a look at rerere, though. It should help resolving repeating\n> conflicts  by recording a resolution of your choice.\n\nUse of rerere often helps but there is a caveat.\n\nEven if two branches (e.g. 'master' and 'maint') currently has the same\ntree, the desired outcome of merging the same commit into them could be\ndifferent depending on the purpose of these branches.  You may want to\nresolve a conflicted merge into 'maint' more conservatively than the way\nyou would resolve the exact same merge into 'master'.\n\nImagine a case where 'master' branch added a better helper functions in\nother files, but they are not in 'maint' yet, and the conflicted part\ncould be resolved better if you made it call these newer helper functions\navailable only in 'master'.\n\nUnfortunately the conflicts would look exactly the same to rerere, so if\nyou record the result of the merge to 'master', replaying that resolution\nwhile merging the same commit to 'maint' would produce undesirable result.\n\nAs to \"does the aggregated result make sense if you blindly add changes in\n'stable' for only conflicted parts to an automerge result?\", which was\nyour other point, you may refer your readers to Avery's recent updates to\nresurrect -Xours option to \"git merge\".\n"}]}