diff options
| author | Mauro Queirós <maurofrqueiros@gmail.com> | 2020-05-29 11:06:09 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:28:16 +0100 |
| commit | d64809679436e9338555ef4e75ea6def93fc09c3 (patch) | |
| tree | 8d8b1ca7521f1c2db4291b42c9cb61b66e9998e5 /bitbake/lib/bb | |
| parent | 3f8b8f8bcafa6d37b89c9e193be1326332366dab (diff) | |
| download | poky-d64809679436e9338555ef4e75ea6def93fc09c3.tar.gz | |
bitbake: git.py: Use the correct branch to check if the repository has LFS objects.
Function "contains_lfs" was only looking at the master branch when searching for LFS
content. LFS may be configured in specific branches only, so we need to use the
correct branch.
(Bitbake rev: 4fa67c2af830035a1ddedc14592ee25a15ebff22)
Signed-off-by: Mauro Queiros <maurofrqueiros@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index eab76a10ad..dbf8715674 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
| @@ -566,8 +566,15 @@ class Git(FetchMethod): | |||
| 566 | """ | 566 | """ |
| 567 | Check if the repository has 'lfs' (large file) content | 567 | Check if the repository has 'lfs' (large file) content |
| 568 | """ | 568 | """ |
| 569 | cmd = "%s grep lfs HEAD:.gitattributes | wc -l" % ( | 569 | |
| 570 | ud.basecmd) | 570 | if not ud.nobranch: |
| 571 | branchname = ud.branches[ud.names[0]] | ||
| 572 | else: | ||
| 573 | branchname = "master" | ||
| 574 | |||
| 575 | cmd = "%s grep lfs origin/%s:.gitattributes | wc -l" % ( | ||
| 576 | ud.basecmd, ud.branches[ud.names[0]]) | ||
| 577 | |||
| 571 | try: | 578 | try: |
| 572 | output = runfetchcmd(cmd, d, quiet=True, workdir=wd) | 579 | output = runfetchcmd(cmd, d, quiet=True, workdir=wd) |
| 573 | if int(output) > 0: | 580 | if int(output) > 0: |
