{"thread":{"id":"23833","subject":"Question: start mergetool with trivial differences already handled?","startedAt":"2010-05-17T20:47:23Z","lastAt":"2010-05-17T22:41:17Z","messageCount":4,"participants":["Uri Okrent","Jay Soffian","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141840","messageId":"AANLkTinYq5LKcY8EDzfCGRoEYXftcd15Dviww749uBUC@mail.gmail.com","threadId":"23833","inReplyTo":null,"subject":"Question: start mergetool with trivial differences already handled?","fromName":"Uri Okrent","fromEmail":"uokrent@gmail.com","sentAt":"2010-05-17T20:47:23Z","receivedAt":"2010-05-17T20:47:23Z","isPatch":false,"sender":{"key":"uokrent@gmail.com","avatar":"https://gravatar.com/avatar/7788ed2d4f1bfefc11082b08b0234fd2d752113623753bda4a032a2ae9687acf?d=mp&s=160"},"body":"Hey all, just wondering if this is possible (as things stand, I don't\nthink it is).\n\nBasically, I'd like to be able to fire up merge tool with all the trivial\nmerges already taken care of (since git is better than I am at resolving the\ntrivial ones anyway).\n\nThe way I understand it, mergetool populates the merge tool with the base\nfile (file from the common ancestor), file from ours, and file from theirs.\nSo, when I pull up mergetool, I see all the differences in between ours and\ntheirs, even if git knows how to resolve many of those.  What I always end up\ndoing instead is just running vi on the unmerged path in my repo since that\nway I only see the actual conflicts (those marked with conflict markers).\n\nThe net effect is that I almost never use mergetool, even though I would\nlike to.\n\nDo the various diff tools out there understand the conflict marker syntax? It\nwould be nice to be able to just tell mergetool to visually display the\n\"unmerged\" version of the path that git dumps in your working tree.  Ideally,\nit would be able to show ours and theirs, with all the trivial differences\npre-selected as git itself would have resolved them, but that seems more pie-\nin-the-sky, and a lot harder to do.\n\nThanks!\n--\n  Uri\n\nPlease consider the environment before printing this message.\nhttp://www.panda.org/how_you_can_help/\n"},{"id":"141842","messageId":"AANLkTiliNtjh6FsGW_S2BRN_C_WjDzdlMxMg90Kekb5G@mail.gmail.com","threadId":"23833","inReplyTo":"AANLkTinYq5LKcY8EDzfCGRoEYXftcd15Dviww749uBUC@mail.gmail.com","subject":"Re: Question: start mergetool with trivial differences already handled?","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-05-17T22:07:02Z","receivedAt":"2010-05-17T22:07:02Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Mon, May 17, 2010 at 4:47 PM, Uri Okrent <uokrent@gmail.com> wrote:\n> Basically, I'd like to be able to fire up merge tool with all the trivial\n> merges already taken care of (since git is better than I am at resolving the\n> trivial ones anyway).\n\nYour merge tool of choice should already do this, if not, you need to\nuse a better merge tool.\n\n> The way I understand it, mergetool populates the merge tool with the base\n> file (file from the common ancestor), file from ours, and file from theirs.\n\nCorrect.\n\n> So, when I pull up mergetool, I see all the differences in between ours and\n> theirs, even if git knows how to resolve many of those.\n\nThis doesn't really have anything to do with git at this point. It's\nup to whatever tool mergetool invokes to perform the 3-way diff\nitself. That tool should then only ask you to resolve the conflicting\nregions, and all other differences should be auto resolved.\n\nMost of the tools that mergetool supports out-of-the-box perform 3-way\ndiffs, so I guess I'm curious what merge tool you're using.\n\nj.\n"},{"id":"141843","messageId":"AANLkTilLX8fWto-xL261Bkj_2fhRDqBPakP7l83QNDBj@mail.gmail.com","threadId":"23833","inReplyTo":"AANLkTiliNtjh6FsGW_S2BRN_C_WjDzdlMxMg90Kekb5G@mail.gmail.com","subject":"Re: Question: start mergetool with trivial differences already handled?","fromName":"Uri Okrent","fromEmail":"uokrent@gmail.com","sentAt":"2010-05-17T22:23:11Z","receivedAt":"2010-05-17T22:23:11Z","isPatch":false,"sender":{"key":"uokrent@gmail.com","avatar":"https://gravatar.com/avatar/7788ed2d4f1bfefc11082b08b0234fd2d752113623753bda4a032a2ae9687acf?d=mp&s=160"},"body":"On Mon, May 17, 2010 at 3:07 PM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> This doesn't really have anything to do with git at this point. It's\n> up to whatever tool mergetool invokes to perform the 3-way diff\n> itself.\n\n\nBut doesn't the git-mergetool command inform the requested merge tool\nwhat it should be displaying?\n\n\n> That tool should then only ask you to resolve the conflicting\n> regions, and all other differences should be auto resolved.\n\n\nI haven't found this to be the case.  Is there a merge tool that can\ndo this?  I had assumed that git used some magic using the project's\nhistory in order to resolve conflicts in a smart way.  Will a merge tool\nthat only has $THEIRS, $OURS, and $BASE have enough information to\nresolve conflicts as smart as git itself does when it produces the\nunmerged file in your working tree?\n\nIf it isn't possible for a merge tool to do that, I guess the behavior\nI'm looking for would be for git to somehow inform the merge tool of how\nthe trivial merges should be resolved, i.e., that it should tell the\nmerge tool to \"use the 'unmerged' path from working tree\" that git merge\n(or git rebase) created.\n\n\n> Most of the tools that mergetool supports out-of-the-box perform 3-way\n> diffs, so I guess I'm curious what merge tool you're using.\n\n\nI use xxdiff or diffuse (or more frequently, vim ;))\n\n-- \n   Uri\n\nPlease consider the environment before printing this message.\nhttp://www.panda.org/how_you_can_help/\n"},{"id":"141844","messageId":"20100517224117.GA12092@coredump.intra.peff.net","threadId":"23833","inReplyTo":"AANLkTilLX8fWto-xL261Bkj_2fhRDqBPakP7l83QNDBj@mail.gmail.com","subject":"Re: Question: start mergetool with trivial differences already handled?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-17T22:41:17Z","receivedAt":"2010-05-17T22:41:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 17, 2010 at 03:23:11PM -0700, Uri Okrent wrote:\n\n> I haven't found this to be the case.  Is there a merge tool that can\n> do this?  I had assumed that git used some magic using the project's\n> history in order to resolve conflicts in a smart way.  Will a merge tool\n> that only has $THEIRS, $OURS, and $BASE have enough information to\n> resolve conflicts as smart as git itself does when it produces the\n> unmerged file in your working tree?\n\nGit uses only $THEIRS, $OURS, and $BASE to do the merge. It doesn't look\nat the interim history at all.\n\n> > Most of the tools that mergetool supports out-of-the-box perform 3-way\n> > diffs, so I guess I'm curious what merge tool you're using.\n> I use xxdiff or diffuse (or more frequently, vim ;))\n\nIf you're using xxdiff, try \"Global > Merge\" from the menu (or the\nCtrl-Alt-M shortcut) to have it automatically merge any non-contentious\nbits.\n\n-Peff\n"}]}