mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3f8b8f8bca
commit
d648096794
@@ -566,8 +566,15 @@ class Git(FetchMethod):
|
|||||||
"""
|
"""
|
||||||
Check if the repository has 'lfs' (large file) content
|
Check if the repository has 'lfs' (large file) content
|
||||||
"""
|
"""
|
||||||
cmd = "%s grep lfs HEAD:.gitattributes | wc -l" % (
|
|
||||||
ud.basecmd)
|
if not ud.nobranch:
|
||||||
|
branchname = ud.branches[ud.names[0]]
|
||||||
|
else:
|
||||||
|
branchname = "master"
|
||||||
|
|
||||||
|
cmd = "%s grep lfs origin/%s:.gitattributes | wc -l" % (
|
||||||
|
ud.basecmd, ud.branches[ud.names[0]])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
output = runfetchcmd(cmd, d, quiet=True, workdir=wd)
|
output = runfetchcmd(cmd, d, quiet=True, workdir=wd)
|
||||||
if int(output) > 0:
|
if int(output) > 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user