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
diff --git a/germinate/seeds.py b/germinate/seeds.py
index 7752b16..fe15734 100644
--- a/germinate/seeds.py
+++ b/germinate/seeds.py
@@ -148,7 +148,7 @@ class Seed:
148 path = os.path.join(base, repository)148 path = os.path.join(base, repository)
149 if not path.endswith("/"):149 if not path.endswith("/"):
150 path += "/"150 path += "/"
151 command = ["git", "clone"]151 command = ["git", "clone", "--depth", "1"]
152 if git_branch is not None:152 if git_branch is not None:
153 command.extend(["-b", git_branch])153 command.extend(["-b", git_branch])
154 _logger.info("Cloning branch %s of %s", git_branch, path)154 _logger.info("Cloning branch %s of %s", git_branch, path)

Subscribers

People subscribed via source and target branches