- /*
- * These ranks are used to sort the final output, because there
- * are certain dependencies:
- *
- * 1. rename/copy that depends on deleted ones.
- * 2. deletions in the original.
- * 3. rename/copy that depends on the pre-edit image of kept files.
- * 4. additions, modifications and no-modifications in the original.
- * 5. rename/copy that depends on the post-edit image of kept files
- * (note that we currently do not detect such rename/copy).
- *
- * The downstream diffcore transformers are free to reorder
- * the entries as long as they keep file pairs that has the
- * same p->one->path in earlier rename_rank to appear before
- * later ones. This ordering is used by the diff_flush()
- * logic to tell renames from copies, and also used by the
- * diffcore_prune() logic to omit unnecessary
- * "no-modification" entries.
- *
- * To the final output routine, and in the diff-raw format
- * output, a rename/copy that is based on a path that has a
- * later entry that shares the same p->one->path and is not a
- * deletion is a copy. Otherwise it is a rename.
- */
+ struct diff_filespec *one, *two, *src, *dst;
+ struct diff_filepair *dp;