]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/ident-date-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 8 May 2018 06:59:30 +0000 (15:59 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 May 2018 06:59:30 +0000 (15:59 +0900)
During a "rebase -i" session, the code could give older timestamp
to commits created by later "pick" than an earlier "reword", which
has been corrected.

* js/ident-date-fix:
  sequencer: reset the committer date before commits

sequencer.c

index 5e3a50fafc91c7ce7488c20fcb0c663c3384a862..4ce5120e777085227dd0f677dfed70a003cffe96 100644 (file)
@@ -1149,6 +1149,8 @@ static int try_to_commit(struct strbuf *msg, const char *author,
                goto out;
        }
 
+       reset_ident_date();
+
        if (commit_tree_extended(msg->buf, msg->len, &tree, parents,
                                 oid, author, opts->gpg_sign, extra)) {
                res = error(_("failed to write commit object"));