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
1=== modified file 'charmhelpers/fetch/giturl.py'
2--- charmhelpers/fetch/giturl.py 2016-01-08 13:27:39 +0000
3+++ charmhelpers/fetch/giturl.py 2016-01-08 15:06:52 +0000
4@@ -49,8 +49,8 @@
5 cmd = ['git', '-C', dest, 'pull', source, branch]
6 else:
7 cmd = ['git', 'clone', source, dest, '--branch', branch]
8- if depth:
9- cmd.extend(['--depth', depth])
10+ if depth:
11+ cmd.extend(['--depth', depth])
12 check_call(cmd)
13
14 def install(self, source, branch="master", dest=None, depth=None):

Subscribers

People subscribed via source and target branches