public static @Nullable AbstractVcs getVcsForFile(@NotNull VirtualFile file, @NotNull Project project) {
    return ProjectLevelVcsManager.getInstance(project).getVcsFor(file);
  }
public static @Nullable AbstractVcs getVcsForFile(@NotNull VirtualFile file, @NotNull Project project)