- /*
- * In the recursive case, we just opt to undo renames
- */
- if (opt->priv->call_depth && (prev_path1 || prev_path2)) {
- /* Put first file (a->oid, a->mode) in its original spot */
- if (prev_path1) {
- if (update_file(opt, 1, a, prev_path1))
- return -1;
- } else {
- if (update_file(opt, 1, a, collide_path))
- return -1;
- }
-
- /* Put second file (b->oid, b->mode) in its original spot */
- if (prev_path2) {
- if (update_file(opt, 1, b, prev_path2))
- return -1;
- } else {
- if (update_file(opt, 1, b, collide_path))
- return -1;
- }
-
- /* Don't leave something at collision path if unrenaming both */
- if (prev_path1 && prev_path2)
- remove_file(opt, 1, collide_path, 0);
-
- return 0;
- }
-