File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,22 @@ def mixed_iterator():
444444 assert new_commit .parents [0 ] == cur_commit
445445 assert len (new_commit .parents ) == 1
446446 assert cur_head .commit == cur_commit
447+
448+ # commit with other actor
449+ cur_commit = cur_head .commit
450+
451+ my_author = Actor ("An author" , "author@example.com" )
452+ my_committer = Actor ("An committer" , "committer@example.com" )
453+ commit_actor = index .commit (commit_message , author = my_author , committer = my_committer )
454+ assert cur_commit != commit_actor
455+ assert commit_actor .author .name == "An author"
456+ assert commit_actor .author .email == "author@example.com"
457+ assert commit_actor .committer .name == "An committer"
458+ assert commit_actor .committer .email == "committer@example.com"
459+ assert commit_actor .message == commit_message
460+ assert commit_actor .parents [0 ] == cur_commit
461+ assert len (new_commit .parents ) == 1
462+ assert cur_head .commit == cur_commit
447463
448464 # same index, no parents
449465 commit_message = "index without parents"
You can’t perform that action at this time.
0 commit comments