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
F15464377: D8099.id18336.diff
Wed, Apr 2, 9:00 AM
F15463969: D8099.id.diff
Wed, Apr 2, 5:08 AM
F15462008: D8099.id18336.diff
Tue, Apr 1, 12:43 PM
F15462007: D8099.id18322.diff
Tue, Apr 1, 12:43 PM
F15462006: D8099.id.diff
Tue, Apr 1, 12:43 PM
F15461643: D8099.diff
Tue, Apr 1, 9:47 AM
F15452691: D8099.id18336.diff
Sat, Mar 29, 6:48 AM
F15448370: D8099.id18322.diff
Fri, Mar 28, 4:29 AM
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