- o_oid = (struct object_id *)&null_oid;
- }
- one.path = a.path = b.path = (char *)path;
- oidcpy(&one.oid, o_oid);
- one.mode = o_mode;
- oidcpy(&a.oid, a_oid);
- a.mode = a_mode;
- oidcpy(&b.oid, b_oid);
- b.mode = b_mode;
-
- if (ci) {
- struct diff_filepair *pair1 = ci->ren1->pair;
-
- path1 = (opt->branch1 == ci->ren1->branch) ?
- pair1->two->path : pair1->one->path;
- /* If ci->ren2->pair != NULL, we are in
- * RENAME_ONE_FILE_TO_ONE case. Otherwise, we have a
- * normal rename.
- */
- path2 = ((ci->ren2 && ci->ren2->pair) ||
- opt->branch2 == ci->ren1->branch) ?
- pair1->two->path : pair1->one->path;
- one.path = pair1->one->path;
- a.path = (char *)path1;
- b.path = (char *)path2;
-
- if (dir_in_way(opt->repo->index, path, !opt->call_depth,
- S_ISGITLINK(pair1->two->mode)))
- df_conflict_remains = 1;
- }
- if (merge_mode_and_contents(opt, &one, &a, &b, path,
+
+ assert(o->path && a->path && b->path);
+ if (ci && dir_in_way(opt->repo->index, path, !opt->call_depth,
+ S_ISGITLINK(ci->ren1->pair->two->mode)))
+ df_conflict_remains = 1;
+
+ if (merge_mode_and_contents(opt, o, a, b, path,