refactor handling of "other" files in ls-files and status