- else if (!diff_unmodified_pair(p))
- /* all the other cases need to be recorded as is */
- diff_q(&outq, p);
- else {
- /* unmodified pair needs to be recorded only if
- * it is used as the source of rename/copy
+ else if (DIFF_FILE_VALID(p->one) && !DIFF_FILE_VALID(p->two)) {
+ /*
+ * Deletion
+ *
+ * We would output this delete record if:
+ *
+ * (1) this is a broken delete and the counterpart
+ * broken create remains in the output; or
+ * (2) this is not a broken delete, and renq does
+ * not have a rename/copy to move p->one->path
+ * out.
+ *
+ * Otherwise, the counterpart broken create
+ * has been turned into a rename-edit; or
+ * delete did not have a matching create to
+ * begin with.