| 538 | } |
| 539 | |
| 540 | static char *quote_two(const char *one, const char *two) |
| 541 | { |
| 542 | int need_one = quote_c_style(one, NULL, NULL, CQUOTE_NODQ); |
| 543 | int need_two = quote_c_style(two, NULL, NULL, CQUOTE_NODQ); |
| 544 | struct strbuf res = STRBUF_INIT; |
| 545 | |
| 546 | if (need_one + need_two) { |
| 547 | strbuf_addch(&res, '"'); |
| 548 | quote_c_style(one, &res, NULL, CQUOTE_NODQ); |
| 549 | quote_c_style(two, &res, NULL, CQUOTE_NODQ); |
| 550 | strbuf_addch(&res, '"'); |
| 551 | } else { |
| 552 | strbuf_addstr(&res, one); |
| 553 | strbuf_addstr(&res, two); |
| 554 | } |
| 555 | return strbuf_detach(&res, NULL); |
| 556 | } |
| 557 | |
| 558 | static const struct external_diff *external_diff(void) |
| 559 | { |
no test coverage detected