MCPcopy Create free account
hub / github.com/AGWA/git-crypt / escape_shell_arg

Function escape_shell_arg

util.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63std::string escape_shell_arg (const std::string& str)
64{
65 std::string new_str;
66 new_str.push_back('"');
67 for (std::string::const_iterator it(str.begin()); it != str.end(); ++it) {
68 if (*it == '"' || *it == '\\' || *it == '$' || *it == '`') {
69 new_str.push_back('\\');
70 }
71 new_str.push_back(*it);
72 }
73 new_str.push_back('"');
74 return new_str;
75}
76
77uint32_t load_be32 (const unsigned char* p)
78{

Callers 1

configure_git_filtersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected