@need 3200

@node Preparing to Merge
@chapter Preparing to Merge

@geindex clean patch sets

@geindex merging, preparation



Large and complex projects, worked on by many people, often have a
primary development path, with most of the day-to-day work being
done on branches.


When it comes time to merge changes with the main development path,
there are at least two reasonable expectations and goals:


@strong{1} Typically, the person(s) modifying the main branch will be
different from the person(s) who wrote the changes being added.
When merging from a branch, the person(s) modifying the main branch
should expect a smooth merge -- one with no conflicts.


@strong{2} The patch set which modifies the main branch should be a @geindex clean
patch set
@dfn{clean
patch set}, which means that it should contain only the desired new
code.  It should perturb existing code as little as possible so that
the patch is easy to review, and easy to merge with other branches.


@code{arch} makes it practical to accomplish these goals in the following
way:




