mirror of
https://git.yoctoproject.org/poky
synced 2026-07-15 15:37:03 +00:00
bitbake: fetch2/git: quote shallow extra ref arguments
BB_GIT_SHALLOW_EXTRA_REFS can include wildcard entries. Matching refs advertised by the remote are later passed to git fetch and update-ref while creating shallow tarballs. Quote the generated command arguments and pass the fetched ref after -- so shell metacharacters and option-like ref names are not interpreted as command syntax or git fetch options. (Bitbake rev: 6d3f8bd4ddc955b49eaa124e0724ea589da30646) Signed-off-by: Anders Heimer <anders.heimer@est.tech> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e9a06f79d9ec767c9d95470be78b006d6fd0d59c) [YC: Only the quote part of the master patch applies. The "--" part does not. This part is handled by bin/git-make-shallow which only pass arguments to git rev-list and rev-parse through arrays] Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
committed by
Paul Barker
parent
73f77a019a
commit
33d210eb57
@@ -602,7 +602,7 @@ class Git(FetchMethod):
|
||||
shallow_cmd = [self.make_shallow_path, '-s']
|
||||
for b in shallow_branches:
|
||||
shallow_cmd.append('-r')
|
||||
shallow_cmd.append(b)
|
||||
shallow_cmd.append(shlex.quote(b))
|
||||
shallow_cmd.extend(shallow_revisions)
|
||||
runfetchcmd(subprocess.list2cmdline(shallow_cmd), d, workdir=dest)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user