Commit 88d035bd by Dave Borowitz Committed by Vicent Marti

Update commit_time along with committer.

parent f24fa088
...@@ -282,6 +282,7 @@ void git_commit_set_committer(git_commit *commit, const char *name, const char * ...@@ -282,6 +282,7 @@ void git_commit_set_committer(git_commit *commit, const char *name, const char *
git_person__free(commit->committer); git_person__free(commit->committer);
commit->committer = git_person__new(name, email, time); commit->committer = git_person__new(name, email, time);
commit->commit_time = time;
} }
void git_commit_set_message(git_commit *commit, const char *message) void git_commit_set_message(git_commit *commit, const char *message)
...@@ -317,5 +318,3 @@ void git_commit_add_parent(git_commit *commit, git_commit *new_parent) ...@@ -317,5 +318,3 @@ void git_commit_add_parent(git_commit *commit, git_commit *new_parent)
node->next = commit->parents; node->next = commit->parents;
commit->parents = node; commit->parents = node;
} }
...@@ -58,6 +58,7 @@ BEGIN_TEST(writenew_test) ...@@ -58,6 +58,7 @@ BEGIN_TEST(writenew_test)
must_be_true(strcmp(committer->name, COMMITTER_NAME) == 0); must_be_true(strcmp(committer->name, COMMITTER_NAME) == 0);
must_be_true(strcmp(committer->email, COMMITTER_EMAIL) == 0); must_be_true(strcmp(committer->email, COMMITTER_EMAIL) == 0);
must_be_true(committer->time == 123456789); must_be_true(committer->time == 123456789);
must_be_true(git_commit_time(commit) == 123456789);
must_be_true(strcmp(git_commit_message(commit), COMMIT_MESSAGE) == 0); must_be_true(strcmp(git_commit_message(commit), COMMIT_MESSAGE) == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment