From dcbb6033fa1dd4b42c412a4f9f3b46ab712721e4 Mon Sep 17 00:00:00 2001 From: Kevin Sun Date: Tue, 8 Nov 2022 18:04:52 -0800 Subject: [PATCH] EdkRepo: Further sync fixes ConfigParser does not support overwriting a gitconfig entry so we are manually deleting it if it exists to write over it. Hsd-es-id: Signed-off-by: Kevin Sun --- edkrepo/commands/sync_command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_command.py index 41c7496..09154b2 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -522,6 +522,8 @@ def __check_submodule_config(self, workspace_path, manifest, repo_sources): section = 'includeIf "gitdir:%(prefix){}/"'.format(gitdir) else: section = 'includeIf "gitdir:{}/"'.format(gitdir) + if gitglobalconfig.has_section(section): + gitglobalconfig.remove_section(section) gitglobalconfig.add_section(section) gitglobalconfig.set(section, 'path', path) gitglobalconfig.release()