12

Why does 'git mergetool' (meld) show me the ancestor view WITH conclict markers? This is totally wrong and I've never understood why it does this. How can I fix it?

A 3 way merge should show

[ Your Changes ]          [ Common Base ]            [ Upstream Changes ]

What I get is:

[ My Changes   ]   [ File with Conflict markers ]    [ Upstream changes ]

See: Sample Screenshot

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
Mark Renouf
  • 30,697
  • 19
  • 94
  • 123

1 Answers1

2

looks like you don't have the parameter names done correctly in the config. You should see things like $BASE, $REMOTE, etc. Make sure these are as specified in the documentation for 'meld'

OR

you have committed, by accident, an unresolved file. To check for this do a git log -S'<<<<<<' and see if anything comes back. If it does, then this is the case.

hope this helps

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • Definitely not the second option, but it is a valid possibility. – Mark Renouf Sep 28 '11 at 00:20
  • 1
    Ok. I will accept as answer. Though it's not quite right.it's a correct explanation of the problem. The basic issue is that meld accepts only 3 parameters. $LOCAL $REMOTE and $BASE. The merged result needs to be written to $MERGED, but this is the file which has conflict markers added by Git. Meld does not support saving the merge result to a NEW file, so the $MERGED file must be use instead of $BASE. -- This is the standard configuration for meld -- It's totally wrong and needlessly confusing. It could be worked around with a script, but I'm using SourceGear DiffMerge now. – Mark Renouf Sep 28 '11 at 00:42
  • The script doesn't seem to work, Meld shows a comparison of directories instead of files. – slikts Dec 22 '11 at 13:31
  • Well, see if you can fix it. It WFM :-) – Mark Renouf Dec 31 '12 at 13:35