1 Introduction

Ediff provides a convenient way for simultaneous browsing through the differences between a pair (or a triple) of files or buffers (which are called ‘variants’ for our purposes). The files being compared, file-A, file-B, and file-C (if applicable) are shown in separate windows (side by side, one above the another, or in separate frames), and the differences are highlighted as you step through them. You can also copy difference regions from one buffer to another (and recover old differences if you change your mind).

Another powerful feature is the ability to merge a pair of files into a third buffer. Merging with an ancestor file, (a.k.a. 3way merges) is also supported. Furthermore, Ediff is equipped with directory-level capabilities that allow the user to conveniently launch browsing or merging sessions on groups of files in two (or three) different directories.

In addition, Ediff can apply a patch to a file and then let you step through both files, the patched and the original one, simultaneously, difference-by-difference. You can even apply a patch right out of a mail buffer, i.e., patches received by mail don’t even have to be saved. Since Ediff lets you copy differences between variants, you can, in effect, apply patches selectively (i.e., you can copy a difference region from file.orig to file, thereby undoing any particular patch that you don’t like).

Ediff even understands multi-file patches and can apply them interactively! (Ediff can recognize multi-file patches only if they are in the context format or GNU unified format. All other patches are treated as 1-file patches. Ediff is [hopefully] using the same algorithm as patch to determine which files need to be patched.)

Ediff is aware of version control, which lets you compare files with their older versions. Ediff also works with remote and compressed files, automatically ftp’ing them over and uncompressing them. See Remote and Compressed Files, for details.

This package builds upon ideas borrowed from Emerge, and several of Ediff’s functions are adaptations from Emerge. Although Ediff subsumes and greatly extends Emerge, much of the functionality in Ediff is influenced by Emerge. The architecture and the interface are, of course, drastically different.