def filter_directories(modified_files)
      modified_files.reject do |file|
        File.directory?(file) && !Overcommit::Utils::FileUtils.symlink?(file)
      end
    end
def filter_directories(modified_files)
      modified_files.reject do |file|
        File.directory?(file) && !Overcommit::Utils::FileUtils.symlink?(file)
      end
    end
Filter out directories. This could happen when changing a symlink to a
 directory as part of an amendment, since the symlink will still appear as
 a file, but the actual working tree will have a directory.