-/* Returns a "date" string that needs to be free()'d by the caller */
-static char *read_author_date_or_null(void)
-{
- char *date;
-
- if (read_author_script(rebase_path_author_script(),
- NULL, NULL, &date, 0))
- return NULL;
- return date;
-}
-
-/* Construct a free()able author string with current time as the author date */
-static char *ignore_author_date(const char *author)
-{
- int len = strlen(author);
- struct ident_split ident;
- struct strbuf new_author = STRBUF_INIT;
-
- if (split_ident_line(&ident, author, len) < 0) {
- error(_("malformed ident line"));
- return NULL;
- }
- len = ident.mail_end - ident.name_begin + 1;
-
- strbuf_addf(&new_author, "%.*s ", len, ident.name_begin);
- datestamp(&new_author);
- return strbuf_detach(&new_author, NULL);
-}
-
-static void push_dates(struct child_process *child, int change_committer_date)
-{
- time_t now = time(NULL);
- struct strbuf date = STRBUF_INIT;
-
- strbuf_addf(&date, "@%"PRIuMAX, (uintmax_t)now);
- argv_array_pushf(&child->env_array, "GIT_AUTHOR_DATE=%s", date.buf);
- if (change_committer_date)
- argv_array_pushf(&child->env_array, "GIT_COMMITTER_DATE=%s", date.buf);
- strbuf_release(&date);
-}
-