diff --git a/git_common.py b/git_common.py index 9d9f46415a..2b7d258f60 100644 --- a/git_common.py +++ b/git_common.py @@ -92,9 +92,10 @@ GIT_TRANSIENT_ERRORS = ( GIT_TRANSIENT_ERRORS_RE = re.compile('|'.join(GIT_TRANSIENT_ERRORS), re.IGNORECASE) -# First version where the for-each-ref command's format string supported the -# upstream:track token. -MIN_UPSTREAM_TRACK_GIT_VERSION = (1, 9) +# git's for-each-ref command first supported the upstream:track token in its +# format string in version 1.9.0, but some usages were broken until 2.3.0. +# See git commit b6160d95 for more information. +MIN_UPSTREAM_TRACK_GIT_VERSION = (2, 3) class BadCommitRefException(Exception): def __init__(self, refs): diff --git a/tests/git_common_test.py b/tests/git_common_test.py index ff5348c191..e7ec3b425f 100755 --- a/tests/git_common_test.py +++ b/tests/git_common_test.py @@ -391,7 +391,6 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase, self.assertTrue(all( isinstance(x, int) for x in self.repo.run(self.gc.get_git_version))) - @unittest.expectedFailure def testGetBranchesInfo(self): self.repo.git('commit', '--allow-empty', '-am', 'foooooo') self.repo.git('checkout', '-tb', 'happybranch', 'master') @@ -430,7 +429,7 @@ class GitMutableFunctionsTest(git_test_utils.GitRepoReadWriteTestBase, 'parent_gone': ( self.repo.run(self.gc.hash_one, 'parent_gone', short=True), 'to_delete', - 1 if supports_track else None, + None, None ), 'to_delete': None