saltstack/salt — pull request #12304 by ryepup (2014-04-25 20:43:38+00:00)
Title: git module: support windows

remove dependence on `pipes.quote` in favor of
`subprocess.list2cmdline`, which is cross-platform. This permits the
git module to be used by windows minions.

`list2cmdline` quotes a little differently than `pipes.quote`, but
produces a safe result:

>>> x = 'A & "B"'
>>> print pipes.quote(x)
'A & "B"'
>>> print subprocess.list2cmdline([x])
"A & \"B\""

Discussed awhile back at: https://groups.google.com/forum/#!topic/salt-users/N_E4Y4mfp7k