From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com []) by mx.groups.io with SMTP id smtpd.web10.1142.1591743861278530599 for ; Tue, 09 Jun 2020 16:04:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: erik.c.bjorge@intel.com) IronPort-SDR: FLZ89B71nv5fAv0ADjZIWPlCZ8x6RcdK+wrTkSfvK/8ay85dQoJDcjSVDS9z2+lZIlu//2079y Ui4U3QN1nkPw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 16:04:24 -0700 IronPort-SDR: NG0OQaJlKNZgT4pG8Fz1NmB5f97k/l+zjUjZoeJisLUg+rBMk5+QZkgTGXFLQGYE6QG2HxdCMa fyqpzLi03Pqg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,493,1583222400"; d="scan'208";a="473223587" Received: from sfp-ecbjorge.amr.corp.intel.com ([10.165.41.176]) by fmsmga005.fm.intel.com with ESMTP; 09 Jun 2020 16:04:24 -0700 From: "Bjorge, Erik C" To: devel@edk2.groups.io Cc: Ashley E Desimone , Nate DeSimone , Puja Pandya , Bret Barkelew , Prince Agyeman Subject: [edk2-staging/EdkRepo] [PATCH v1 1/2] EdkRepo: Add force flag when removing submodules Date: Tue, 9 Jun 2020 16:04:05 -0700 Message-Id: <2fc6277c477b2ce69f4d130dbdc68dc3f514ee94.1591743203.git.erik.c.bjorge@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Submodules may generate un-tracked or modify files in the repo. when removing the submodule do so even with modifications. Cc: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Bret Barkelew Cc: Prince Agyeman Cc: Erik Bjorge Signed-off-by: Erik Bjorge --- project_utils/submodule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project_utils/submodule.py b/project_utils/submodule.py index 170629b..3d1b620 100644 --- a/project_utils/submodule.py +++ b/project_utils/submodule.py @@ -48,14 +48,14 @@ def _deinit(repo, submodules=None, verbose=False): verbose - Enable verbose messages """ if submodules is None: - output_data = repo.git.execute(['git', 'submodule', 'deinit', '--all'], + output_data = repo.git.execute(['git', 'submodule', 'deinit', '-f', '--all'], with_extended_output=True, with_stdout=True) display_git_output(output_data, verbose) else: for sub in submodules: if verbose: print(strings.SUBMOD_DEINIT_PATH.format(sub.path)) - output_data = repo.git.execute(['git', 'submodule', 'deinit', '--', sub.path], + output_data = repo.git.execute(['git', 'submodule', 'deinit', '-f', '--', sub.path], with_extended_output=True, with_stdout=True) display_git_output(output_data, verbose) return -- 2.27.0.windows.1