diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py index 32c1df7..d9b4664 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -514,7 +514,7 @@ def __check_submodule_config(self, workspace_path, manifest, repo_sources): try: local_manifest_dir = os.path.join(workspace_path, "repo") prefix_required = find_git_version() >= GitVersion('2.34.0') - includeif_regex = re.compile('^includeIf "gitdir:{}(/.+)/"$'.format('%\(prefix\)' if prefix_required else '')) + includeif_regex = re.compile('^includeIf "gitdir:{}(/.+)/"$'.format('%\\(prefix\\)' if prefix_required else '')) rewrite_everything = False #Generate list of .gitconfig files that should be present in the workspace included_configs = [] diff --git a/edkrepo/common/workspace_maintenance/git_config_maintenance.py b/edkrepo/common/workspace_maintenance/git_config_maintenance.py index b993e38..cee3414 100644 --- a/edkrepo/common/workspace_maintenance/git_config_maintenance.py +++ b/edkrepo/common/workspace_maintenance/git_config_maintenance.py @@ -22,10 +22,10 @@ def clean_git_globalconfig(): prefix_required = find_git_version() >= GitVersion('2.34.0') with git.GitConfigParser(global_gitconfig_path, read_only=False) as git_globalconfig: if prefix_required: - includeif_regex = re.compile('^includeIf "gitdir:%\(prefix\)(/.+)/"$') + includeif_regex = re.compile('^includeIf "gitdir:%\\(prefix\\)(/.+)/"$') includeif_regex_old = re.compile('^includeIf "gitdir:(/.+)/"$') else: - includeif_regex_old = re.compile('^includeIf "gitdir:%\(prefix\)(/.+)/"$') + includeif_regex_old = re.compile('^includeIf "gitdir:%\\(prefix\\)(/.+)/"$') includeif_regex = re.compile('^includeIf "gitdir:(/.+)/"$') for section in git_globalconfig.sections(): data = includeif_regex.match(section)