We seem to have variants of the seme theme in many places. * builtin-apply.c::remove_file() * builtin-rm.c::remove_file() -- this one leaks the strdup result * refs.c::remove_empty_dir_recursive() * unpack-trees.c::unlink_entry() * mrege-recursive.c::remove_path() It would be nicer to consolidate their "remove the now potentially empty directories recursively" part in a single function and have them call it. Some of them try to be more efficient by not allocating an extra string (because they know the string supplied by the caller is a fair game), so the clean-up might be slightly involved, but I think it is worth it. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html