]> git.ipfire.org Git - thirdparty/git.git/commit
git-p4: pass command arguments as lists instead of using shell
authorJoel Holdsworth <jholdsworth@nvidia.com>
Thu, 6 Jan 2022 21:40:34 +0000 (21:40 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Jan 2022 22:55:12 +0000 (14:55 -0800)
commit8a470599f340e2e2bcf96f0b267199de321edef2
tree4424c1edc1f9d90d4952b15d57170c8dbd38f2fe
parent3d8a3038bce2b13faeca0b776efa896d1c0d0b49
git-p4: pass command arguments as lists instead of using shell

In the majority of the subprocess calls where shell=True was used, it
was only needed to parse command arguments by spaces. In each of these
cases, the commands are now being passed in as lists instead of strings.

This change aids the comprehensibility of the code. Constucting commands
and arguments using strings risks bugs from unsanitized inputs, and the
attendant complexity of properly quoting and escaping command arguments.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py