Merge ~mwhudson/germinate:clone-depth-1 into germinate:master

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 6984b0c0ad93829c1baf118ad6744fdfef88353e
Proposed branch: ~mwhudson/germinate:clone-depth-1
Merge into: germinate:master
Diff against target: 13 lines (+1/-1)
1 file modified
germinate/seeds.py (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+455837@code.launchpad.net

Commit message

perform shallow clones of seed repos

The repos are not very large to start with but it does make a noticeable
difference for me (8s vs 5s or so)

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/germinate/seeds.py b/germinate/seeds.py
2index 7752b16..fe15734 100644
3--- a/germinate/seeds.py
4+++ b/germinate/seeds.py
5@@ -148,7 +148,7 @@ class Seed:
6 path = os.path.join(base, repository)
7 if not path.endswith("/"):
8 path += "/"
9- command = ["git", "clone"]
10+ command = ["git", "clone", "--depth", "1"]
11 if git_branch is not None:
12 command.extend(["-b", git_branch])
13 _logger.info("Cloning branch %s of %s", git_branch, path)

Subscribers

People subscribed via source and target branches