Topics

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


Bjorge, Erik C
 

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@...>
Cc: Nate DeSimone <@natedesimone>
Cc: Puja Pandya <puja.pandya@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Prince Agyeman <prince.agyeman@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Signed-off-by: Erik Bjorge <erik.c.bjorge@...>
---
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


Nate DeSimone
 

Reviewed-by: Nate DeSimone <@natedesimone>

-----Original Message-----
From: Erik Bjorge <erik.c.bjorge@...>
Sent: Wednesday, October 14, 2020 2:04 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@...>; Desimone,
Nathaniel L <@natedesimone>; Pandya, Puja
<puja.pandya@...>; Bret Barkelew <Bret.Barkelew@...>;
Agyeman, Prince <prince.agyeman@...>
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@...>
Cc: Nate DeSimone <@natedesimone>
Cc: Puja Pandya <puja.pandya@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Prince Agyeman <prince.agyeman@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Signed-off-by: Erik Bjorge <erik.c.bjorge@...>
---
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


Nate DeSimone
 

-----Original Message-----
From: Erik Bjorge <erik.c.bjorge@...>
Sent: Wednesday, October 14, 2020 2:04 PM
To: devel@edk2.groups.io
Cc: Desimone, Ashley E <ashley.e.desimone@...>; Desimone,
Nathaniel L <@natedesimone>; Pandya, Puja
<puja.pandya@...>; Bret Barkelew <Bret.Barkelew@...>;
Agyeman, Prince <prince.agyeman@...>
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@...>
Cc: Nate DeSimone <@natedesimone>
Cc: Puja Pandya <puja.pandya@...>
Cc: Bret Barkelew <Bret.Barkelew@...>
Cc: Prince Agyeman <prince.agyeman@...>
Cc: Erik Bjorge <erik.c.bjorge@...>
Signed-off-by: Erik Bjorge <erik.c.bjorge@...>
---
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