convenient wrapper to deal with NULL strbuf */
| 345 | |
| 346 | /* convenient wrapper to deal with NULL strbuf */ |
| 347 | __attribute__((format (printf, 2, 3))) |
| 348 | static void strbuf_addf_gently(struct strbuf *buf, const char *fmt, ...) |
| 349 | { |
| 350 | va_list params; |
| 351 | |
| 352 | if (!buf) |
| 353 | return; |
| 354 | |
| 355 | va_start(params, fmt); |
| 356 | strbuf_vaddf(buf, fmt, params); |
| 357 | va_end(params); |
| 358 | } |
| 359 | |
| 360 | int validate_worktree(const struct worktree *wt, struct strbuf *errmsg, |
| 361 | unsigned flags) |
no test coverage detected