How shall I understand the different outputs by `-A` and by `-e` of diff3?

diffutils’ manual says, in diff3 -A mine older yours

The ‘–show-all’ (‘-A’) option acts like the ‘-e’ option, except that it brackets conflicts, and it outputs all changes from older to yours, not just the unmerged changes.

I have three files, each with four lines of numbers

$ paste f1 f2 f3
0   0   1
2   1   2
2   3   3
4   5   6

Is it correct that there is no merged changes, so -A and -e should both output the unmerged changes only?

How shall I understand the following different outputs by -A and by -e?
I guess that I lack some knowledge to understand the ed script generated by -A. For example, I am not sure what this command does at the end of the output by -A. Usually a command is followed by lines to be added, but there doesn’t seem to be any line following the command:

0a
<<<<<<< f1
.

Thanks.


Among the changes from f2 to f3, the unmerged changes are

$ diff3 -e f1 f2 f3
1,4c
1
2
3
6
.

All the changes from f2 to f3, consisting of both unmerged and merged changes, are:

$ diff3 -A f1 f2 f3
4a
||||||| f2
0
1
3
5
=======
1
2
3
6
>>>>>>> f3
.
0a
<<<<<<< f1
.

Leave a Reply

Your email address will not be published. Required fields are marked *