Skip to content

Commit 6de040d

Browse files
luked99gitster
authored andcommitted
git-p4: handle files with shell metacharacters
git-p4 used to simply pass strings into system() and popen(), and relied on the shell doing the necessary expansion. This though meant that shell metacharacters in file names would be corrupted - for example files with $ or space in them. Switch to using subprocess.Popen() and friends, and pass in explicit arrays in the places where it matters. This then avoids needing shell expansion. Add trivial helper functions for some common perforce operations. Add test case. [pw: test cleanup] Signed-off-by: Luke Diamand <[email protected]> Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb585a9 commit 6de040d

File tree

2 files changed

+187
-77
lines changed

2 files changed

+187
-77
lines changed

0 commit comments

Comments
 (0)