ath12k-check: get_commited_files(): use --name-only

No need to use cut as git ls-tree has --name-only. No functional changes.

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
This commit is contained in:
Kalle Valo 2024-01-26 18:20:54 +02:00
parent 02efab2e3e
commit 0a556ac040

View file

@ -276,8 +276,8 @@ def run_checkpatch_cmd(args, q, tag_map):
# get all driver files which are commited to git, includes Kconfig, Makefile etc # get all driver files which are commited to git, includes Kconfig, Makefile etc
def get_commited_files(): def get_commited_files():
cmd = 'git ls-tree HEAD %s | cut -f 2' % (DRIVER_DIR) cmd = ['git', 'ls-tree', '--name-only', 'HEAD', DRIVER_DIR]
output = subprocess.check_output(cmd, shell=True, universal_newlines=True) output = subprocess.check_output(cmd, universal_newlines=True)
return output.splitlines() return output.splitlines()
def run_checkpatch(args): def run_checkpatch(args):