File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,22 @@ def mixed_iterator():
444
444
assert new_commit .parents [0 ] == cur_commit
445
445
assert len (new_commit .parents ) == 1
446
446
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
447
463
448
464
# same index, no parents
449
465
commit_message = "index without parents"
You can’t perform that action at this time.
0 commit comments