Page MenuHomePhabricator

Add "%R" to csprintf(), for printing more readable commands
ClosedPublic

Authored by epriestley on Jan 29 2014, 10:02 PM.
Tags
None
Referenced Files
F13046430: D8099.id18336.diff
Thu, Apr 18, 9:42 AM
F13043170: D8099.diff
Wed, Apr 17, 2:21 PM
Unknown Object (File)
Tue, Apr 16, 12:50 AM
Unknown Object (File)
Thu, Apr 11, 7:31 AM
Unknown Object (File)
Wed, Apr 10, 12:51 PM
Unknown Object (File)
Sun, Apr 7, 10:26 AM
Unknown Object (File)
Tue, Apr 2, 5:57 AM
Unknown Object (File)
Fri, Mar 22, 3:11 PM
Subscribers

Details

Summary

Ref T4175. The clone commands we print have quoted arguments, but usually don't need them. Add "%R", which is like "%s" but only adds quotes if they're required. This produces slightly more readable commands in the few cases we're generating commands for users to copy/paste.

Test Plan

Added unit tests. Looked up shell metacharacters to double check my definition.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped