{"thread":{"id":"26440","subject":"rebase planning: determining blobs changed by multiple branches","startedAt":"2011-02-08T00:41:44Z","lastAt":"2011-02-08T01:27:54Z","messageCount":3,"participants":["Neal Kreitzinger","Marc Weber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"160663","messageId":"iiq3kb$aiv$1@dough.gmane.org","threadId":"26440","inReplyTo":null,"subject":"rebase planning: determining blobs changed by multiple branches","fromName":"Neal Kreitzinger","fromEmail":"neal@rsss.com","sentAt":"2011-02-08T00:41:44Z","receivedAt":"2011-02-08T00:41:44Z","isPatch":false,"sender":{"key":"neal@rsss.com","avatar":null},"body":"We have 15 branches that are unmerged, but are based on the same published \nhistory.  They branched off at different points in the history.  Each branch \nis comprised of a single squashed commit (except for master).  How can I \ncompare all 15 branches with the tip of master to see which file merges \n(blobs) they have in common?\n\na-------b-------c-------d-------e-------f-------g-------i-------j-------k-------l\n|           |            |           |           |                      | \n|          |           |---k1\n|           |            |           |           |                      | \n|          |---j1\n|           |            |           |           |                      | \n|---i1\n|           |            |           |           | \n|---g1\n|           |            |           |           |---e1\n|           |            |           |           |---e2\n|           |            |           |           |---e3\n|           |            |           |---d1\n|           |            |           |---d2\n|           |            |           |---d3\n|           |            |---c1\n|           |            |---c2\n|           |---b1\n|           |---b2\n|---a1\n\nThe goal is to create a sane plan for rebasing.  If the question is insane \nas it is stated, then please advise on any sane ways to approach this \nbesides just rebasing one-by-one and making the last poor branch wait till \nthe end to rebase with a ton of conflicts.  I'm dealing with users who \nrefuse to do frequent rebases, so a plan the minimizes rebases while getting \nthe most out of each rebase is desired, if practical.\n\nv/r,\nNeal \n"},{"id":"160668","messageId":"1297126350-sup-6606@localhost.localdomain","threadId":"26440","inReplyTo":"iiq3kb$aiv$1@dough.gmane.org","subject":"Re: rebase planning: determining blobs changed by multiple branches","fromName":"Marc Weber","fromEmail":"marco-oweber@gmx.de","sentAt":"2011-02-08T00:59:11Z","receivedAt":"2011-02-08T00:59:11Z","isPatch":false,"sender":{"key":"marco-oweber@gmx.de","avatar":null},"body":"Hi Neal,\n\nI'm not quite sure what you want to do?\nrebase all branches on top of commit l so that they are up to date?\n\nWhy do you want to find common blobs?\nIf the same conflict happens you could use gitrere and reuse a conflict\nresolution.\n\ngit ls-files --with $HASH\ngives you a list of files\n\ngit diff --name-only\nshould  give you a nice list of modified files.\n\nSo using the intersection of  ls-files of branch and tip should give you\ncommon files. Substracting changed files using --name-only should yield\nthe files which were not modified.\nMaybe there are nicer solutions though.\n\nRebasing is always bad. Have you considered using top-git?\nThis way you can merge with tip and create the rebased patches using the\nexport function.\n\nMarc Weber\n"},{"id":"160672","messageId":"4D509C1A.50801@gmail.com","threadId":"26440","inReplyTo":"1297126350-sup-6606@localhost.localdomain","subject":"Re: rebase planning: determining blobs changed by multiple branches","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2011-02-08T01:27:54Z","receivedAt":"2011-02-08T01:27:54Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 2/7/2011 6:59 PM, Marc Weber wrote:\n> Hi Neal,\n>\n> I'm not quite sure what you want to do?\n> rebase all branches on top of commit l so that they are up to date?\n>\n> Why do you want to find common blobs?\n> If the same conflict happens you could use gitrere and reuse a conflict\n> resolution.\n>\n> git ls-files --with $HASH\n> gives you a list of files\n>\n> git diff --name-only\n> should  give you a nice list of modified files.\n>\n> So using the intersection of  ls-files of branch and tip should give you\n> common files. Substracting changed files using --name-only should yield\n> the files which were not modified.\n> Maybe there are nicer solutions though.\n>\n> Rebasing is always bad. Have you considered using top-git?\n> This way you can merge with tip and create the rebased patches using the\n> export function.\n\nOur master represents our new system and we want to have a linear \nhistory so we use rebase.  Each branch is a project.  If a project does \nnot have any merges with other projects then it can rebase with little \nimpact.  If projects are changing alot of the same blobs then they will \nhave alot of merged blobs and can be rebased on eachother in \nthrow-away-integration branches.  In this way the branches can be \ngrouped into appropriate rebase groups so the merge-conflict resolutions \nof these groups can be resolved simultaneously in different integration \nrepos.  So lets say you have 5 groups, then you can rebase those 5 \nintegration-branches onto master one-by-one instead of doing 15 project \nbranches one-by-one.  I thought maybe git had a cool command for \nanalyzing this in one fell swoop.\n\nv/r,\nNeal\n"}]}