| 2240 | } |
| 2241 | |
| 2242 | __attribute__((format (printf, 3, 4))) |
| 2243 | static const char *reflog_message(struct replay_opts *opts, |
| 2244 | const char *sub_action, const char *fmt, ...) |
| 2245 | { |
| 2246 | va_list ap; |
| 2247 | static struct strbuf buf = STRBUF_INIT; |
| 2248 | |
| 2249 | va_start(ap, fmt); |
| 2250 | strbuf_reset(&buf); |
| 2251 | strbuf_addstr(&buf, sequencer_reflog_action(opts)); |
| 2252 | if (sub_action) |
| 2253 | strbuf_addf(&buf, " (%s)", sub_action); |
| 2254 | if (fmt) { |
| 2255 | strbuf_addstr(&buf, ": "); |
| 2256 | strbuf_vaddf(&buf, fmt, ap); |
| 2257 | } |
| 2258 | va_end(ap); |
| 2259 | |
| 2260 | return buf.buf; |
| 2261 | } |
| 2262 | |
| 2263 | static int do_pick_commit(struct repository *r, |
| 2264 | struct todo_item *item, |
no test coverage detected