aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Queirós <maurofrqueiros@gmail.com>2021-02-03 04:22:06 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-05 12:18:26 +0000
commit3d09608cabd404733b95ea92d5b00830ded77834 (patch)
treeadb87c9c90637e3688d4a8d78970455252280fbf
parent418c00c570a60845556204b4f52de047b284dd8e (diff)
downloadbitbake-contrib-3d09608cabd404733b95ea92d5b00830ded77834.tar.gz
git.py: skip smudging if lfs=0 is set
Git-LFS objects were being fetched even when lfs=0 was not set. This patch disables LFS smudging when lfs=0. That way, only the LFS pointers are downloaded during checkout. Signed-off-by: Mauro Queiros <maurofrqueiros@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 646d86df7de774255246a3d7051c308e43eb257d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index dcecff5d3..59afc32de 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -475,6 +475,9 @@ class Git(FetchMethod):
need_lfs = ud.parm.get("lfs", "1") == "1"
+ if not need_lfs:
+ ud.basecmd = "GIT_LFS_SKIP_SMUDGE=1 " + ud.basecmd
+
source_found = False
source_error = []