[edk2-devel] [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Removing checkout in clone command

Bjorge, Erik C posted 1 patch 1 week ago
Failed in applying to current master (apply log)
edkrepo/common/common_repo_functions.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

[edk2-devel] [edk2-staging/EdkRepo] [PATCH v1] EdkRepo: Removing checkout in clone command

Posted by Bjorge, Erik C 1 week ago
When cloning a repo the files do not need to be checked out.  This is
because files will be checked out based on information in the manifest
later.  This reduces a number of file operations on larger repos and
will improve clone performance.

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>
---
 edkrepo/common/common_repo_functions.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index d14f89a..0d54bbf 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -79,9 +79,9 @@ def clone_repos(args, workspace_dir, repos_to_clone, project_client_side_hooks,
     for repo_to_clone in repos_to_clone:
         local_repo_path = os.path.join(workspace_dir, repo_to_clone.root)
         local_repo_url = repo_to_clone.remote_url
-        print ("Cloning from: " + str(local_repo_url))
-        repo = Repo.clone_from(local_repo_url, local_repo_path, progress=GitProgressHandler())
-        #Fetch notes
+        print("Cloning from: " + str(local_repo_url))
+        repo = Repo.clone_from(local_repo_url, local_repo_path, progress=GitProgressHandler(), no_checkout=True)
+        # Fetch notes
         repo.remotes.origin.fetch("refs/notes/*:refs/notes/*")
 
         # Add the primary remote so that a reference to the latest code is available when
-- 
2.21.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66226): https://edk2.groups.io/g/devel/message/66226
Mute This Topic: https://groups.io/mt/77515395/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 v1] EdkRepo: Removing checkout in clone command

Posted by Nate DeSimone 1 week ago
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

> -----Original Message-----
> From: Erik Bjorge <erik.c.bjorge@intel.com>
> Sent: Wednesday, October 14, 2020 2:04 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 v1] EdkRepo: Removing checkout in
> clone command
> 
> When cloning a repo the files do not need to be checked out.  This is because
> files will be checked out based on information in the manifest later.  This
> reduces a number of file operations on larger repos and will improve clone
> performance.
> 
> 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>
> ---
>  edkrepo/common/common_repo_functions.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/edkrepo/common/common_repo_functions.py
> b/edkrepo/common/common_repo_functions.py
> index d14f89a..0d54bbf 100644
> --- a/edkrepo/common/common_repo_functions.py
> +++ b/edkrepo/common/common_repo_functions.py
> @@ -79,9 +79,9 @@ def clone_repos(args, workspace_dir, repos_to_clone,
> project_client_side_hooks,
>      for repo_to_clone in repos_to_clone:
>          local_repo_path = os.path.join(workspace_dir, repo_to_clone.root)
>          local_repo_url = repo_to_clone.remote_url
> -        print ("Cloning from: " + str(local_repo_url))
> -        repo = Repo.clone_from(local_repo_url, local_repo_path,
> progress=GitProgressHandler())
> -        #Fetch notes
> +        print("Cloning from: " + str(local_repo_url))
> +        repo = Repo.clone_from(local_repo_url, local_repo_path,
> progress=GitProgressHandler(), no_checkout=True)
> +        # Fetch notes
>          repo.remotes.origin.fetch("refs/notes/*:refs/notes/*")
> 
>          # Add the primary remote so that a reference to the latest code is
> available when
> --
> 2.21.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66227): https://edk2.groups.io/g/devel/message/66227
Mute This Topic: https://groups.io/mt/77515395/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-