[edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 1/3] EdkRepo: Add force flag when removing submodules

Bjorge, Erik C posted 3 patches 5 years, 8 months ago
[edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 1/3] EdkRepo: Add force flag when removing submodules
Posted by Bjorge, Erik C 5 years, 8 months ago
Submodules may generate un-tracked or modify files in the repo.  when
removing the submodule do so even with modifications.

Cc: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
---
 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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61099): https://edk2.groups.io/g/devel/message/61099
Mute This Topic: https://groups.io/mt/74807384/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v2 1/3] EdkRepo: Add force flag when removing submodules
Posted by Ashley E Desimone 5 years, 7 months ago
Pushed as: be6fadb6b0398cbcdf8ddbd40f5c16b67d17e551

-----Original Message-----
From: Bjorge, Erik C <erik.c.bjorge@intel.com> 
Sent: Wednesday, June 10, 2020 3:14 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Agyeman, Prince <prince.agyeman@intel.com>
Subject: [edk2-staging/EdkRepo] [PATCH v2 1/3] EdkRepo: Add force flag when removing submodules

Submodules may generate un-tracked or modify files in the repo.  when removing the submodule do so even with modifications.

Cc: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Erik Bjorge <erik.c.bjorge@intel.com>
Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
---
 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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61537): https://edk2.groups.io/g/devel/message/61537
Mute This Topic: https://groups.io/mt/74807384/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-