From 9db5d0481ebcf54cdc3aa34253a2c8bd56644b90 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. Signed-off-by: Kevin Sun Reviewed-by: Ashley E Desimone Signed-off-by: Ashley E Desimone --- 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()