Message ID | 20241027202030.3875780-1-martin.jansa@gmail.com |
---|---|
State | Accepted, archived |
Commit | 53264dc14554890b3a2afc83cb1749cf10d86854 |
Headers | show |
Series | [2.0] fetch2/git: Use quote from shlex, not pipes | expand |
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 9ecc855af..dc86aabfe 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -861,9 +861,8 @@ class Git(FetchMethod): commits = None else: if not os.path.exists(rev_file) or not os.path.getsize(rev_file): - from pipes import quote commits = bb.fetch2.runfetchcmd( - "git rev-list %s -- | wc -l" % quote(rev), + "git rev-list %s -- | wc -l" % shlex.quote(rev), d, quiet=True).strip().lstrip('0') if commits: open(rev_file, "w").write("%d\n" % int(commits))