Depth limit git checkouts

Registered by Jamie Lennox

For most people most of the time the entire history of a project is not required to use devstack and it takes a while to check it out.

For example in a completely unscientific - but unfaked test:

[jlennox@dhcp-40-102 gittest]$ time git clone https://github.com/openstack/nova.git nova1
Cloning into 'nova1'...
remote: Counting objects: 293756, done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 293756 (delta 42), reused 8 (delta 2)
Receiving objects: 100% (293756/293756), 199.46 MiB | 2.11 MiB/s, done.
Resolving deltas: 100% (229009/229009), done.
Checking connectivity... done.

real 3m17.766s
user 0m35.468s
sys 0m4.847s
[jlennox@dhcp-40-102 gittest]$ time git clone --depth 5 https://github.com/openstack/nova.git nova2
Cloning into 'nova2'...
remote: Counting objects: 6277, done.
remote: Compressing objects: 100% (4471/4471), done.
remote: Total 6277 (delta 3374), reused 3375 (delta 1572)
Receiving objects: 100% (6277/6277), 5.63 MiB | 1012.00 KiB/s, done.
Resolving deltas: 100% (3374/3374), done.
Checking connectivity... done.

real 0m21.472s
user 0m1.084s
sys 0m0.479s

As you can now develop and push from a shallow repository there would seem to be no reason to not allow (i'm not suggesting we enable it by default) doing shallow clones.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Jamie Lennox
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Dean Troyer
Completed by
Dean Troyer

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/git-depth,n,z

Addressed by: https://review.openstack.org/129646
    Allow depth limiting git clones

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.