From nobody Fri May 3 09:41:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68328+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68328+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1607061049; cv=none; d=zohomail.com; s=zohoarc; b=ffVLlgbEjNemOcapQYQiNn9Pe4lEhAJTHUvhYqcPPAgHW7H4ZvppmIS1yqO+U/II3ZqHgMhIkYHwzYq2UDz+YE9f+EnWlp9h3XAKPpZ+t7MFT2xrKPRl6PHYdQq+a+bcgS8H05KpHViObQdD1Jte7pgwBXLJOzrW/ZupYuZaX+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607061049; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XacNjYwmZZeJHcbOOkIEekWkEmUcxYHqaF6qZ+lqVmc=; b=MVSM/9J8D8CAx9H3PdhpsD0PKCWOzzUJT77NGV/7znJlOk+0EMJlhYrMoCaI+1RxQSGnnbPgLZI6u4QGIKpIFUr2jqBIBPIG0S7hWvm/UJdqiIzgOIB4iqrIb6b70s5GMzuzmDvd+64XRTh6hlD1F+NYEqjdb5ggiGMeBm/y3VM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68328+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1607061049583950.6582054319038; Thu, 3 Dec 2020 21:50:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id JdBHYY1788612x32DQGik6gN; Thu, 03 Dec 2020 21:50:49 -0800 X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.10443.1607061047846610334 for ; Thu, 03 Dec 2020 21:50:47 -0800 IronPort-SDR: SeJgYueLFgF/9kSTJGunBrrwU8loVxtWLHQSngs6ZqzryBKfjnpaQo1pmPQf2G7hFDChVy02Hg CJ0oRw2xTDVQ== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="161100983" X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208";a="161100983" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 21:50:44 -0800 IronPort-SDR: WmVa5HJgWHDv6dylj1WGsufE98pp9nRbcS0Heac594vXl4tFd1dpFsJTlqqFWhC13HI+7dYdbB JtechUQrHyBA== X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208";a="540566774" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.254.71.13]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 21:50:44 -0800 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-devel] [Edk2-staging/EdkRepo] [PATCH 1/2] EdkRepo: Move git config clean up function to a common location Date: Thu, 3 Dec 2020 21:50:14 -0800 Message-Id: <20201204055015.3432-2-ashley.e.desimone@intel.com> In-Reply-To: <20201204055015.3432-1-ashley.e.desimone@intel.com> References: <20201204055015.3432-1-ashley.e.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashley.e.desimone@intel.com X-Gm-Message-State: dE0gdtiYPPQpWSH8TBtX1Uwex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607061049; bh=L8Bd9oa2VojDjtZzlbKXX01J/xSzUxr5HSN4wlxZO5k=; h=Cc:Date:From:Reply-To:Subject:To; b=vtBcTa2jXB2nzoT9T6KfJM5rjuueYrvp6i8G9Exc/lgxe6SCi/gel0cycMzwjXAgUbD bqyyYKFp1kigLqkU9LsGG4/u6wGXexOANXivuYFx5Ctjegjt54NGS6x+e5zf6uUpt27Am O5+Sthe1Z9NKd42E046zLJ4iwERI5v6tF+s= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This commit moves the functionality to clean unneeded include if entries from the global git config to a common location and updates the sync command to import this content. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Ashley E Desimone Reviewed-by: Nate DeSimone --- edkrepo/commands/sync_command.py | 27 +++----------- .../git_config_maintenance.py | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 edkrepo/common/workspace_maintenance/git_config_mainten= ance.py diff --git a/edkrepo/commands/sync_command.py b/edkrepo/commands/sync_comma= nd.py index 9b438ad..25c7430 100644 --- a/edkrepo/commands/sync_command.py +++ b/edkrepo/commands/sync_command.py @@ -41,6 +41,7 @@ from edkrepo.common.common_repo_functions import update_r= epo_commit_template, ge from edkrepo.common.common_repo_functions import has_primary_repo_remote, = fetch_from_primary_repo, in_sync_with_primary from edkrepo.common.common_repo_functions import update_hooks, combination= s_in_manifest from edkrepo.common.common_repo_functions import write_included_config, re= move_included_config +from edkrepo.common.workspace_maintenance.git_config_maintenance import cl= ean_git_globalconfig from edkrepo.common.workspace_maintenance.workspace_maintenance import gen= erate_name_for_obsolete_backup from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t pull_workspace_manifest_repo from edkrepo.common.workspace_maintenance.manifest_repos_maintenance impor= t find_source_manifest_repo @@ -104,7 +105,7 @@ class SyncCommand(EdkrepoCommand): if not args.update_local_manifest: self.__check_for_new_manifest(args, config, initial_manifest, = workspace_path, global_manifest_directory) check_dirty_repos(initial_manifest, workspace_path) - + # Determine if sparse checkout needs to be disabled for this opera= tion sparse_settings =3D initial_manifest.sparse_settings sparse_enabled =3D sparse_checkout_enabled(workspace_path, initial= _sources) @@ -118,7 +119,7 @@ class SyncCommand(EdkrepoCommand): reset_sparse_checkout(workspace_path, initial_sources) =20 # Get the latest manifest if requested - if args.update_local_manifest: # NOTE: hyphens in arg name replac= ed with underscores due to argparse + if args.update_local_manifest: # NOTE: hyphens in arg name replac= ed with underscores due to argparse self.__update_local_manifest(args, config, initial_manifest, w= orkspace_path, global_manifest_directory) manifest =3D get_workspace_manifest() if args.update_local_manifest: @@ -152,7 +153,7 @@ class SyncCommand(EdkrepoCommand): # Update submodule configuration if not args.update_local_manifest: #Performance optimization, __up= date_local_manifest() will do this self.__check_submodule_config(workspace_path, manifest, repo_s= ources_to_sync) - self.__clean_git_globalconfig() + clean_git_globalconfig() for repo_to_sync in repo_sources_to_sync: local_repo_path =3D os.path.join(workspace_path, repo_to_sync.= root) # Update any hooks @@ -453,22 +454,4 @@ class SyncCommand(EdkrepoCommand): finally: gitglobalconfig.release() =20 - def __clean_git_globalconfig(self): - global_gitconfig_path =3D os.path.normpath(expanduser("~/.gitconfi= g")) - with git.GitConfigParser(global_gitconfig_path, read_only=3DFalse)= as git_globalconfig: - includeif_regex =3D re.compile('^includeIf "gitdir:(/.+)/"$') - for section in git_globalconfig.sections(): - data =3D includeif_regex.match(section) - if data: - gitrepo_path =3D data.group(1) - gitconfig_path =3D git_globalconfig.get(section, 'path= ') - if sys.platform =3D=3D "win32": - gitrepo_path =3D gitrepo_path[1:] - gitconfig_path =3D gitconfig_path[1:] - gitrepo_path =3D os.path.normpath(gitrepo_path) - gitconfig_path =3D os.path.normpath(gitconfig_path) - (repo_manifest_path, _) =3D os.path.split(gitconfig_pa= th) - repo_manifest_path =3D os.path.join(repo_manifest_path= , "Manifest.xml") - if not os.path.isdir(gitrepo_path) and not os.path.isf= ile(gitconfig_path): - if not os.path.isfile(repo_manifest_path): - git_globalconfig.remove_section(section) + diff --git a/edkrepo/common/workspace_maintenance/git_config_maintenance.py= b/edkrepo/common/workspace_maintenance/git_config_maintenance.py new file mode 100644 index 0000000..a90f95d --- /dev/null +++ b/edkrepo/common/workspace_maintenance/git_config_maintenance.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +## @file +# git_config_maintenance.py +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +import os +import re +import sys + +import git + +from edkrepo.common.pathfix import expanduser + +def clean_git_globalconfig(): + global_gitconfig_path =3D os.path.normpath(expanduser("~/.gitconfig")) + with git.GitConfigParser(global_gitconfig_path, read_only=3DFalse) as = git_globalconfig: + includeif_regex =3D re.compile('^includeIf "gitdir:(/.+)/"$') + for section in git_globalconfig.sections(): + data =3D includeif_regex.match(section) + if data: + gitrepo_path =3D data.group(1) + gitconfig_path =3D git_globalconfig.get(section, 'path') + if sys.platform =3D=3D "win32": + gitrepo_path =3D gitrepo_path[1:] + gitconfig_path =3D gitconfig_path[1:] + gitrepo_path =3D os.path.normpath(gitrepo_path) + gitconfig_path =3D os.path.normpath(gitconfig_path) + (repo_manifest_path, _) =3D os.path.split(gitconfig_path) + repo_manifest_path =3D os.path.join(repo_manifest_path, "M= anifest.xml") + if not os.path.isdir(gitrepo_path) and not os.path.isfile(= gitconfig_path): + if not os.path.isfile(repo_manifest_path): + git_globalconfig.remove_section(section) \ No newline at end of file --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68328): https://edk2.groups.io/g/devel/message/68328 Mute This Topic: https://groups.io/mt/78703869/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 09:41:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68327+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68327+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1607061049; cv=none; d=zohomail.com; s=zohoarc; b=MzKolgDx+ZYQe+ZIJlrlWE6M0v5OxDYyN6vbkvlwByvYNkBitngMTqrnQNVvGMYF7e1bKYqOr0cWJZ+YWovHPTYCefG3qErpGdDqb9bBOdTWSCRhIF5xMWvkaHXoRtixpWBTh9PnDvbRNLYhHs44jSehXYc7EM+jEIReefga8sk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607061049; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Cq1d8hQx/IivVVWwAq7/0av5yMqSiLUqmORbAvkWJ4w=; b=XjPNg3a/3ZD14eyqIbCisGh6eoNV7vfXijKD41IcmYb4XkGCtHBXJSWQPrgVsqCOipHxbqKnkOxHK3q/ewN2stjl9H6RPZxl1AmlJQODx1mCE8QxtR4FT7Sb0Rd3XZymnErzhKF2a/pVaiYCvlDfmTfOXtDjqG474nYBf1ch880= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68327+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1607061049009191.8730350226923; Thu, 3 Dec 2020 21:50:49 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id cyDTYY1788612xKnk2hsmfLC; Thu, 03 Dec 2020 21:50:48 -0800 X-Received: from mga18.intel.com (mga18.intel.com []) by mx.groups.io with SMTP id smtpd.web12.10472.1607061047330862554 for ; Thu, 03 Dec 2020 21:50:47 -0800 IronPort-SDR: DGZ12Yq1wIXKsDsfiZeyikXKLaPrfG8fb3IoOmAT+GZO0R7L7g1QFQo2sjMS1XI3BwTJQhitfW GST1WN8aIXAA== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="161100984" X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208";a="161100984" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 21:50:44 -0800 IronPort-SDR: GYQVENtaY5ZA0TGdVp38suKT8Wh7ThkUky8xD2PCdUgBNRiwRqoRvPM3HEVyHACG6EnEIsX7V+ a0GzsUly1s2Q== X-IronPort-AV: E=Sophos;i="5.78,391,1599548400"; d="scan'208";a="540566778" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.254.71.13]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2020 21:50:44 -0800 From: "Ashley E Desimone" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman , Erik Bjorge Subject: [edk2-devel] [Edk2-staging/EdkRepo] [PATCH 2/2] EdkRepo: Add the edkrepo maintenance command Date: Thu, 3 Dec 2020 21:50:15 -0800 Message-Id: <20201204055015.3432-3-ashley.e.desimone@intel.com> In-Reply-To: <20201204055015.3432-1-ashley.e.desimone@intel.com> References: <20201204055015.3432-1-ashley.e.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashley.e.desimone@intel.com X-Gm-Message-State: lsmszD7VjzTQjTAVfB4LLsIAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607061048; bh=2jtflf8oJDbqx7unPwTzmlNyzKZxHWZvMYdKnwKkHGQ=; h=Cc:Date:From:Reply-To:Subject:To; b=Xv1mdQ1aDh5CShSmQSNzMjkWMfbRXwJnEznMsfwdQnb2MMW9Tq68km16jTyqAdsyqG1 DyXnOxOgSozg2luKoepK8G69PjjuDg2jYEIwCAGp0Uy8GY2N8VLQ3SDjmMlHaHvln0CBl 94uY3lca0/QK/p67o6eecZfx1e13I+dsOQM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add the maintenance command to streamline workspace and git global config mainteneance operations. The command will remove unused insteadOf entries and configure the longpaths setting in the global config. The command will also run 'git reflog expire --expire=3Dnow --all', 'git gc --aggressive --prune=3Dnow' and 'git remote prune origin' for all repositories in the workspace. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Ashley E Desimone Reviewed-by: Nate DeSimone --- .../commands/arguments/maintenance_args.py | 12 ++++ edkrepo/commands/humble/maintenance_humble.py | 16 +++++ edkrepo/commands/maintenance_command.py | 71 +++++++++++++++++++ .../git_config_maintenance.py | 9 ++- 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 edkrepo/commands/arguments/maintenance_args.py create mode 100644 edkrepo/commands/humble/maintenance_humble.py create mode 100644 edkrepo/commands/maintenance_command.py diff --git a/edkrepo/commands/arguments/maintenance_args.py b/edkrepo/comma= nds/arguments/maintenance_args.py new file mode 100644 index 0000000..09571ff --- /dev/null +++ b/edkrepo/commands/arguments/maintenance_args.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +# +## @file +# maintenance_args.py +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +COMMAND_DESCRIPTION =3D 'Performs workspace wide maintenance operations' + + diff --git a/edkrepo/commands/humble/maintenance_humble.py b/edkrepo/comman= ds/humble/maintenance_humble.py new file mode 100644 index 0000000..46e18b5 --- /dev/null +++ b/edkrepo/commands/humble/maintenance_humble.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +# +## @file +# maintenance_humble.py +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +LONGPATH_CONFIG =3D 'Configuring git longpaths support' +CLEAN_INSTEAD_OFS =3D 'Removing unused "InsteadOf" entries from the git gl= obal config' +NO_WOKKSPACE =3D 'Not currently in a valid workspace. No workspace level m= aintenance tasks will be completed.' +REPO_MAINTENANCE =3D 'Currently conducting maintenance operations for the = {} repository' +GC_AGGRESSIVE =3D ' Running: git gc --aggressive --prune=3Dnow (this may= take a significant amount of time)' +REFLOG_EXPIRE =3D ' Running: git reflog expire --expire=3Dnow --all' +REMOTE_PRUNE =3D ' Running: git remote prune origin' \ No newline at end of file diff --git a/edkrepo/commands/maintenance_command.py b/edkrepo/commands/mai= ntenance_command.py new file mode 100644 index 0000000..aff9d3b --- /dev/null +++ b/edkrepo/commands/maintenance_command.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +# +## @file +# maintenance_command.py +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +import os +import sys + +import git +from git import Repo + +from edkrepo.commands.edkrepo_command import EdkrepoCommand +from edkrepo.commands.arguments import maintenance_args as arguments +from edkrepo.commands.humble import maintenance_humble as humble +from edkrepo.common.workspace_maintenance.git_config_maintenance import cl= ean_git_globalconfig, set_long_path_support +from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidExcept= ion +from edkrepo.config.config_factory import get_workspace_path, get_workspac= e_manifest +from edkrepo_manifest_parser.edk_manifest import ManifestXml + + +class MaintenanceCommande(EdkrepoCommand): + + def __init__(self): + super().__init__() + + def get_metadata(self): + metadata =3D {} + metadata['name'] =3D 'maintenance' + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION + args =3D [] + metadata['arguments'] =3D args + return metadata + + def run_command(self, args, config): + + # Configure git long path support + print(humble.LONGPATH_CONFIG) + set_long_path_support() + print() + + # Remove unneeded instead of entries from git global config + print(humble.CLEAN_INSTEAD_OFS) + print() + + # If in a valid workspace run the following for each repo: + # git reflog --expire, git gc, git remote prune origin + try: + workspace_path =3D get_workspace_path() + except EdkrepoWorkspaceInvalidException: + workspace_path - None + print(humble.NO_WOKKSPACE) + print() + + if workspace_path: + manifest =3D get_workspace_manifest() + repos_to_maintain =3D manifest.get_repo_sources(manifest.gener= al_config.current_combo) + for repo_to_maintain in repos_to_maintain: + local_repo_path =3D os.path.join(workspace_path, repo_to_m= aintain.root) + repo =3D Repo(local_repo_path) + print(humble.REPO_MAINTENANCE.format(repo_to_maintain.root= )) + print(humble.REFLOG_EXPIRE) + repo.git.reflog('expire', '--expire=3Dnow', '--all') + print(humble.GC_AGGRESSIVE) + repo.git.gc('--aggressive', '--prune=3Dnow') + print(humble.REMOTE_PRUNE) + repo.git.remote('prune', 'origin') + print() diff --git a/edkrepo/common/workspace_maintenance/git_config_maintenance.py= b/edkrepo/common/workspace_maintenance/git_config_maintenance.py index a90f95d..4f8bc46 100644 --- a/edkrepo/common/workspace_maintenance/git_config_maintenance.py +++ b/edkrepo/common/workspace_maintenance/git_config_maintenance.py @@ -33,4 +33,11 @@ def clean_git_globalconfig(): repo_manifest_path =3D os.path.join(repo_manifest_path, "M= anifest.xml") if not os.path.isdir(gitrepo_path) and not os.path.isfile(= gitconfig_path): if not os.path.isfile(repo_manifest_path): - git_globalconfig.remove_section(section) \ No newline at end of file + git_globalconfig.remove_section(section) + +def set_long_path_support(): + global_git_config_path =3D os.path.normpath(expanduser("~/.gitconfig")) + with git.GitConfigParser(global_git_config_path, read_only=3DFalse) as= git_globalconfig: + if 'core' not in git_globalconfig.sections(): + git_globalconfig.add_section('core') + git_globalconfig.set('core', 'longpaths', 'true') \ No newline at end of file --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68327): https://edk2.groups.io/g/devel/message/68327 Mute This Topic: https://groups.io/mt/78703868/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-