From 6f1c626a9b38af3cec15df8975bd26dd267bb07e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 Feb 2020 00:09:23 -0500 Subject: [PATCH] drop old git_require checks We've been requiring git-1.7.2 since Oct 2012, so we can safely drop the individual checks sprinkled throughout the code base for older. Change-Id: I1737fff7b3f27f475960b0bff9cb300aefd5d108 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253135 Reviewed-by: David Pursehouse Tested-by: Mike Frysinger --- project.py | 3 --- subcmds/grep.py | 4 ++-- subcmds/sync.py | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/project.py b/project.py index 016f4a53..9bc9ace5 100644 --- a/project.py +++ b/project.py @@ -3125,9 +3125,6 @@ class Project(object): raise TypeError('%s() got an unexpected keyword argument %r' % (name, k)) if config is not None: - if not git_require((1, 7, 2)): - raise ValueError('cannot set config on command line for %s()' - % name) for k, v in config.items(): cmdv.append('-c') cmdv.append('%s=%s' % (k, v)) diff --git a/subcmds/grep.py b/subcmds/grep.py index 13069286..89611cd6 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py @@ -21,7 +21,7 @@ import sys from color import Coloring from command import PagedCommand from error import GitError -from git_command import git_require, GitCommand +from git_command import GitCommand class GrepColoring(Coloring): @@ -162,7 +162,7 @@ contain a line that matches both expressions: out = GrepColoring(self.manifest.manifestProject.config) cmd_argv = ['grep'] - if out.is_on and git_require((1, 6, 3)): + if out.is_on: cmd_argv.append('--color') cmd_argv.extend(getattr(opt, 'cmd_argv', [])) diff --git a/subcmds/sync.py b/subcmds/sync.py index cc058af6..937d6e87 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -580,8 +580,7 @@ later is required to fix a server side protocol bug. project.config.SetString('gc.pruneExpire', 'never') gc_gitdirs[project.gitdir] = project.bare_git - has_dash_c = git_require((1, 7, 2)) - if multiprocessing and has_dash_c: + if multiprocessing: cpu_count = multiprocessing.cpu_count() else: cpu_count = 1