Merge lp:~corey.bryant/charm-helpers/depth-clone-only into lp:charm-helpers

Proposed by Corey Bryant
Status: Merged
Merged at revision: 516
Proposed branch: lp:~corey.bryant/charm-helpers/depth-clone-only
Merge into: lp:charm-helpers
Diff against target: 14 lines (+2/-2)
1 file modified
charmhelpers/fetch/giturl.py (+2/-2)
To merge this branch: bzr merge lp:~corey.bryant/charm-helpers/depth-clone-only
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+282016@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Corey Bryant (corey.bryant) wrote :

While --depth is a valid option on 'git pull' it doesn't seem to work all that great. For example, --depth 0 is valid for 'git clone' but not for 'git pull'. I don't see any reason for it to be specified on 'git pull' so this patch only uses --depth with 'git clone'. As a historical point, 'git pull' was just recently added to this code while 'git clone' with --depth already existed prior to that.

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/fetch/giturl.py'
--- charmhelpers/fetch/giturl.py 2016-01-08 13:27:39 +0000
+++ charmhelpers/fetch/giturl.py 2016-01-08 15:06:52 +0000
@@ -49,8 +49,8 @@
49 cmd = ['git', '-C', dest, 'pull', source, branch]49 cmd = ['git', '-C', dest, 'pull', source, branch]
50 else:50 else:
51 cmd = ['git', 'clone', source, dest, '--branch', branch]51 cmd = ['git', 'clone', source, dest, '--branch', branch]
52 if depth:52 if depth:
53 cmd.extend(['--depth', depth])53 cmd.extend(['--depth', depth])
54 check_call(cmd)54 check_call(cmd)
5555
56 def install(self, source, branch="master", dest=None, depth=None):56 def install(self, source, branch="master", dest=None, depth=None):

Subscribers

People subscribed via source and target branches