All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: start mergetool with trivial differences already handled?
@ 2010-05-17 20:47 Uri Okrent
  2010-05-17 22:07 ` Jay Soffian
  0 siblings, 1 reply; 4+ messages in thread
From: Uri Okrent @ 2010-05-17 20:47 UTC (permalink / raw)
  To: The Git Mailing List

Hey all, just wondering if this is possible (as things stand, I don't
think it is).

Basically, I'd like to be able to fire up merge tool with all the trivial
merges already taken care of (since git is better than I am at resolving the
trivial ones anyway).

The way I understand it, mergetool populates the merge tool with the base
file (file from the common ancestor), file from ours, and file from theirs.
So, when I pull up mergetool, I see all the differences in between ours and
theirs, even if git knows how to resolve many of those.  What I always end up
doing instead is just running vi on the unmerged path in my repo since that
way I only see the actual conflicts (those marked with conflict markers).

The net effect is that I almost never use mergetool, even though I would
like to.

Do the various diff tools out there understand the conflict marker syntax? It
would be nice to be able to just tell mergetool to visually display the
"unmerged" version of the path that git dumps in your working tree.  Ideally,
it would be able to show ours and theirs, with all the trivial differences
pre-selected as git itself would have resolved them, but that seems more pie-
in-the-sky, and a lot harder to do.

Thanks!
--
  Uri

Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question: start mergetool with trivial differences already  handled?
  2010-05-17 20:47 Question: start mergetool with trivial differences already handled? Uri Okrent
@ 2010-05-17 22:07 ` Jay Soffian
  2010-05-17 22:23   ` Uri Okrent
  0 siblings, 1 reply; 4+ messages in thread
From: Jay Soffian @ 2010-05-17 22:07 UTC (permalink / raw)
  To: Uri Okrent; +Cc: The Git Mailing List

On Mon, May 17, 2010 at 4:47 PM, Uri Okrent <uokrent@gmail.com> wrote:
> Basically, I'd like to be able to fire up merge tool with all the trivial
> merges already taken care of (since git is better than I am at resolving the
> trivial ones anyway).

Your merge tool of choice should already do this, if not, you need to
use a better merge tool.

> The way I understand it, mergetool populates the merge tool with the base
> file (file from the common ancestor), file from ours, and file from theirs.

Correct.

> So, when I pull up mergetool, I see all the differences in between ours and
> theirs, even if git knows how to resolve many of those.

This doesn't really have anything to do with git at this point. It's
up to whatever tool mergetool invokes to perform the 3-way diff
itself. That tool should then only ask you to resolve the conflicting
regions, and all other differences should be auto resolved.

Most of the tools that mergetool supports out-of-the-box perform 3-way
diffs, so I guess I'm curious what merge tool you're using.

j.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question: start mergetool with trivial differences already  handled?
  2010-05-17 22:07 ` Jay Soffian
@ 2010-05-17 22:23   ` Uri Okrent
  2010-05-17 22:41     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Uri Okrent @ 2010-05-17 22:23 UTC (permalink / raw)
  To: Jay Soffian; +Cc: The Git Mailing List

On Mon, May 17, 2010 at 3:07 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> This doesn't really have anything to do with git at this point. It's
> up to whatever tool mergetool invokes to perform the 3-way diff
> itself.


But doesn't the git-mergetool command inform the requested merge tool
what it should be displaying?


> That tool should then only ask you to resolve the conflicting
> regions, and all other differences should be auto resolved.


I haven't found this to be the case.  Is there a merge tool that can
do this?  I had assumed that git used some magic using the project's
history in order to resolve conflicts in a smart way.  Will a merge tool
that only has $THEIRS, $OURS, and $BASE have enough information to
resolve conflicts as smart as git itself does when it produces the
unmerged file in your working tree?

If it isn't possible for a merge tool to do that, I guess the behavior
I'm looking for would be for git to somehow inform the merge tool of how
the trivial merges should be resolved, i.e., that it should tell the
merge tool to "use the 'unmerged' path from working tree" that git merge
(or git rebase) created.


> Most of the tools that mergetool supports out-of-the-box perform 3-way
> diffs, so I guess I'm curious what merge tool you're using.


I use xxdiff or diffuse (or more frequently, vim ;))

-- 
   Uri

Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question: start mergetool with trivial differences already handled?
  2010-05-17 22:23   ` Uri Okrent
@ 2010-05-17 22:41     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2010-05-17 22:41 UTC (permalink / raw)
  To: Uri Okrent; +Cc: Jay Soffian, The Git Mailing List

On Mon, May 17, 2010 at 03:23:11PM -0700, Uri Okrent wrote:

> I haven't found this to be the case.  Is there a merge tool that can
> do this?  I had assumed that git used some magic using the project's
> history in order to resolve conflicts in a smart way.  Will a merge tool
> that only has $THEIRS, $OURS, and $BASE have enough information to
> resolve conflicts as smart as git itself does when it produces the
> unmerged file in your working tree?

Git uses only $THEIRS, $OURS, and $BASE to do the merge. It doesn't look
at the interim history at all.

> > Most of the tools that mergetool supports out-of-the-box perform 3-way
> > diffs, so I guess I'm curious what merge tool you're using.
> I use xxdiff or diffuse (or more frequently, vim ;))

If you're using xxdiff, try "Global > Merge" from the menu (or the
Ctrl-Alt-M shortcut) to have it automatically merge any non-contentious
bits.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-17 22:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-17 20:47 Question: start mergetool with trivial differences already handled? Uri Okrent
2010-05-17 22:07 ` Jay Soffian
2010-05-17 22:23   ` Uri Okrent
2010-05-17 22:41     ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.