Questions tagged [diff3]

diff3 is a Unix utility to compare three files and show any differences among them.

When two people have made changes to copies of the same file, diff3 can produce a merged output that contains both sets of changes together with warnings about conflicts.

diff3 can:

  1. merge three or more sets of changes to a file by merging two change sets at a time.

  2. incorporate changes from two modified versions into a common preceding version.

diff3 has several methods to handle overlaps and conflicts. It can omit overlaps or conflicts, or select only overlaps, or mark conflicts with special '<<<<<<<' and '>>>>>>>' lines.

diff3 can output the merge results as an ed script that can be applied to the first file to yield the merged output. However, directly generating the merged output bypasses some problems with ed.

Read more

25 questions
83
votes
5 answers

Should diff3 be default conflictstyle on git?

Recently I enabled diff3 and it's much easier to resolve conflict now. Previously in some cases I had to check the log to see why people did this and that to do the merge. But with diff3 the information is displayed all in one place <<<<<<<…
Pham
  • 1,065
  • 1
  • 7
  • 9
30
votes
1 answer

Git - diff3 Conflict Style - Temporary merge branch

I am doing a merge with merge.conflictStyle set to diff3. Normally, this inserts three (3) sections separated by four (4) sets of characters. The Git Documentation for Merge clearly explains what these symbols mean for a simple case (as described…
Joseph K. Strauss
  • 4,683
  • 1
  • 23
  • 40
16
votes
1 answer

VimDiff E93: More than one match for RE

So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command: :diffg RE I get the error: E93: More than one match for RE Not sure where this is coming from…
15
votes
2 answers

Doing a three-way compare with Git and KDiff3

Is it possible to set Git up so that I can use the three-way compare in KDiff3? I have two branches that are far too different to auto-merge them, I simply have to check each merge point and I think the best way would be to check out the branch I…
Makis
  • 12,468
  • 10
  • 62
  • 71
6
votes
1 answer

Annotated diff file with "<<<<<<< mine" and ">>>>>>> yours" type markers

I am trying to create a diff file using the Linux diff command that has markers like this (taken from diff3 man page): <<<<<<< mine lines from mine ======= lines from yours >>>>>>> yours …
stephenmm
  • 2,640
  • 3
  • 30
  • 48
5
votes
1 answer

How do I use "zealous diff3" with git? And what are the pros and cons?

I just read the release notes for Git 2.35.0 (note 2.35.1 is already available though). In those release notes, I saw that: "Zealous diff3" style of merge conflict presentation has been added. My questions: How do I make git diff / difftool…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
5
votes
1 answer

Strange conflict on git

I read an article about three-way merges (diff3). It gives an example about how is detects a conflict. The example is : A=[1,4,5,2,3,6] O=[1,2,3,4,5,6] <<< Origin B=[1,2,4,5,3,6] In the first time it computes the diff between O-A and after…
Mehdi
  • 2,160
  • 6
  • 36
  • 53
3
votes
2 answers

Git Merge - Difference Between conflictStyle diff3 and merge

Context git merge considers the setting merge.conflictStyle in case of merge conflicts. Possible values are merge (default) and diff3. I noticed that diff3 sometimes produces much bigger conflicts (see example below). I found this paper, which…
Henning
  • 579
  • 6
  • 17
3
votes
0 answers

SVN - How to use external diff3 for binary files?

I have some external mydiff3.exe, working with text and binary files. My svn command line is svn.exe update my_work_copy_path --diff3-cmd mydiff3.exe This work well for text files (svn call mydiff3.exe for each conflicted files through update…
Y.N
  • 4,989
  • 7
  • 34
  • 61
2
votes
1 answer

GNU diff3 (three-way merge) gives unexpected result

Assume that files MINE and YOURS are descendants of OLD. FILE_MINE= abc def ghi FILE_OLD= abc jkl ghi FILE_YOURS= abc def ghi Command diff3 -m MIND OLD YOURS gives: abc <<<<<<< OLD jkl ======= def >>>>>>> YOURS ghi diff3 cannot resolve that…
kevinarpe
  • 20,319
  • 26
  • 127
  • 154
2
votes
1 answer

Apply multiple patches to get accumulated changes

I have a base sourcefile base.hs which I use create different extended versions of the same program (foo.hs, bar.hs, baz.hs). Now I want to create a patch file of every modified version but the patches should accumulate to get a program which…
Gerold Meisinger
  • 4,500
  • 5
  • 26
  • 33
1
vote
2 answers

Araxis merge doesn't show file names when merging

I have svn command-line client integrated with Araxis merge and I want to manually merge even when no conflicts discovered. When I run for example: so in my ~/.subversion/config file I set diff3 external editor: diff3-cmd =…
schatten
  • 1,497
  • 1
  • 12
  • 19
1
vote
1 answer

How to use diff3 with ed

How to use diff3 together with ed? My attempt below does not match diff3 --merge output, so I must be doing something wrong. Context: I've ported OpenBSD's diff3prog.c utility to be used in BusyBox, which has diff and ed. cat <<- EOF >…
Vadim Kantorov
  • 930
  • 1
  • 10
  • 28
1
vote
2 answers

Subversion config: What's diff3-has-program-arg for?

Subversion has the option diff3-has-program-arg ### Set diff3-has-program-arg to 'yes' if your 'diff3' program ### accepts the '--diff-program' option. diff3-has-program-arg = [ yes | no ] My diff3 does support the --diff-program option, but I…
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
1
vote
2 answers

diff3-like program for windows?

I'm a linux user, and normally I use kdiff3 to compare 3 (text) files between each others (for example, when there are svn conflics). I know of various programs to do that (like diff3 or meld) but none for windows. Is there a 3-file-differ for…
Vito De Tullio
  • 2,332
  • 3
  • 33
  • 52
1
2