diff --git a/git_cl.py b/git_cl.py index 04a617c083..67d349989c 100755 --- a/git_cl.py +++ b/git_cl.py @@ -3038,24 +3038,6 @@ class _GitCookiesChecker(object): counters = collections.Counter(h for h, _, _ in self.get_hosts_with_creds()) return set(host for host, count in counters.items() if count > 1) - _EXPECTED_HOST_IDENTITY_DOMAINS = { - 'chromium.googlesource.com': 'chromium.org', - 'chrome-internal.googlesource.com': 'google.com', - } - - def get_hosts_with_wrong_identities(self): - """Finds hosts which **likely** reference wrong identities. - - Note: skips hosts which have conflicting identities for Git and Gerrit. - """ - hosts = set() - for host, expected in self._EXPECTED_HOST_IDENTITY_DOMAINS.items(): - pair = self._get_git_gerrit_identity_pairs().get(host) - if pair and pair[0] == pair[1]: - _, domain = self._parse_identity(pair[0]) - if domain != expected: - hosts.add(host) - return hosts @staticmethod def _format_hosts(hosts, extra_column_func=None): @@ -3100,14 +3082,6 @@ class _GitCookiesChecker(object): tuple(self._get_git_gerrit_identity_pairs()[host])), conflicting) - wrong = self.get_hosts_with_wrong_identities() - if wrong: - yield ('These hosts likely use wrong identity', - self._format_hosts(wrong, lambda host: '%s but %s recommended' % - (self._get_git_gerrit_identity_pairs()[host][0], - self._EXPECTED_HOST_IDENTITY_DOMAINS[host])), - wrong) - def find_and_report_problems(self): """Returns True if there was at least one problem, else False.""" found = False diff --git a/tests/git_cl_creds_check_report.txt b/tests/git_cl_creds_check_report.txt index 48d62b243e..4680043cd6 100644 --- a/tests/git_cl_creds_check_report.txt +++ b/tests/git_cl_creds_check_report.txt @@ -17,15 +17,8 @@ conflict.googlesource.com git-example.google.com vs git-example.chromium.org - These hosts likely use wrong identity: - - chrome-internal.googlesource.com git-example.chromium.org but google.com recommended - chromium.googlesource.com git-example.google.com but chromium.org recommended - You can manually remove corresponding lines in your ~%(sep)s.gitcookies file and visit the following URLs with correct account to generate correct credential lines: - https://chrome-internal-review.googlesource.com/new-password - https://chromium-review.googlesource.com/new-password https://conflict-review.googlesource.com/new-password https://gpartial-review.googlesource.com/new-password https://partial-review.googlesource.com/new-password diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 2c06c98c6c..1027190c26 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -490,7 +490,6 @@ class GitCookiesCheckerTest(unittest.TestCase): self.assertEqual(set(), self.c.get_conflicting_hosts()) self.assertEqual(set(), self.c.get_duplicated_hosts()) self.assertEqual(set(), self.c.get_partially_configured_hosts()) - self.assertEqual(set(), self.c.get_hosts_with_wrong_identities()) def test_analysis(self): self.mock_hosts_creds([ @@ -516,9 +515,6 @@ class GitCookiesCheckerTest(unittest.TestCase): self.assertEqual(set(['partial.googlesource.com', 'gpartial-review.googlesource.com']), self.c.get_partially_configured_hosts()) - self.assertEqual(set(['chromium.googlesource.com', - 'chrome-internal.googlesource.com']), - self.c.get_hosts_with_wrong_identities()) def test_report_no_problems(self): self.test_analysis_nothing()