MCPcopy Create free account
hub / github.com/git/git / quote_two_c_style

Function quote_two_c_style

quote.c:310–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310void quote_two_c_style(struct strbuf *sb, const char *prefix, const char *path,
311 unsigned flags)
312{
313 int nodq = !!(flags & CQUOTE_NODQ);
314 if (quote_c_style(prefix, NULL, NULL, 0) ||
315 quote_c_style(path, NULL, NULL, 0)) {
316 if (!nodq)
317 strbuf_addch(sb, '"');
318 quote_c_style(prefix, sb, NULL, CQUOTE_NODQ);
319 quote_c_style(path, sb, NULL, CQUOTE_NODQ);
320 if (!nodq)
321 strbuf_addch(sb, '"');
322 } else {
323 strbuf_addstr(sb, prefix);
324 strbuf_addstr(sb, path);
325 }
326}
327
328void write_name_quoted(const char *name, FILE *fp, int terminator)
329{

Callers 3

dump_quoted_pathFunction · 0.85
emit_rewrite_diffFunction · 0.85
print_helper_statusFunction · 0.85

Calls 3

quote_c_styleFunction · 0.85
strbuf_addchFunction · 0.85
strbuf_addstrFunction · 0.85

Tested by

no test coverage detected