* Saves state->author_name, state->author_email and state->author_date in the * state directory's "author-script" file. */
| 337 | * state directory's "author-script" file. |
| 338 | */ |
| 339 | static void write_author_script(const struct am_state *state) |
| 340 | { |
| 341 | struct strbuf sb = STRBUF_INIT; |
| 342 | |
| 343 | strbuf_addstr(&sb, "GIT_AUTHOR_NAME="); |
| 344 | sq_quote_buf(&sb, state->author_name); |
| 345 | strbuf_addch(&sb, '\n'); |
| 346 | |
| 347 | strbuf_addstr(&sb, "GIT_AUTHOR_EMAIL="); |
| 348 | sq_quote_buf(&sb, state->author_email); |
| 349 | strbuf_addch(&sb, '\n'); |
| 350 | |
| 351 | strbuf_addstr(&sb, "GIT_AUTHOR_DATE="); |
| 352 | sq_quote_buf(&sb, state->author_date); |
| 353 | strbuf_addch(&sb, '\n'); |
| 354 | |
| 355 | write_state_text(state, "author-script", sb.buf); |
| 356 | |
| 357 | strbuf_release(&sb); |
| 358 | } |
| 359 | |
| 360 | /** |
| 361 | * Reads the commit message from the state directory's "final-commit" file, |
no test coverage detected