diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index d34ea1de29..35e0db56cf 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -125,6 +125,9 @@ class GitProgressHandler(bb.progress.LineFilterProgressHandler): | |||
125 | 125 | ||
126 | 126 | ||
127 | class Git(FetchMethod): | 127 | class Git(FetchMethod): |
128 | bitbake_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.join(os.path.abspath(__file__))), '..', '..', '..')) | ||
129 | make_shallow_path = os.path.join(bitbake_dir, 'bin', 'git-make-shallow') | ||
130 | |||
128 | """Class to fetch a module or modules from git repositories""" | 131 | """Class to fetch a module or modules from git repositories""" |
129 | def init(self, d): | 132 | def init(self, d): |
130 | pass | 133 | pass |
@@ -446,7 +449,7 @@ class Git(FetchMethod): | |||
446 | shallow_branches.append(r) | 449 | shallow_branches.append(r) |
447 | 450 | ||
448 | # Make the repository shallow | 451 | # Make the repository shallow |
449 | shallow_cmd = ['git', 'make-shallow', '-s'] | 452 | shallow_cmd = [self.make_shallow_path, '-s'] |
450 | for b in shallow_branches: | 453 | for b in shallow_branches: |
451 | shallow_cmd.append('-r') | 454 | shallow_cmd.append('-r') |
452 | shallow_cmd.append(b) | 455 | shallow_cmd.append(b) |