+ if ((ce_stage(other) == stage) &&
+ other->name[namelen] == '/') {
+ if (!ok_to_replace)
+ return -1;
+ fprintf(stderr, "removing file '%s' under '%s' to be replaced with a file\n", other->name, path);
+ remove_entry_at(pos);
+ replaced = 1;
+ continue; /* cycle without updating pos */
+ }