File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ committer and others.
216216.. autoattribute :: pygit2.Commit.committer
217217.. autoattribute :: pygit2.Commit.message
218218.. autoattribute :: pygit2.Commit.message_encoding
219+ .. autoattribute :: pygit2.Commit.raw_message
219220.. autoattribute :: pygit2.Commit.tree
220221.. autoattribute :: pygit2.Commit.parents
221222.. autoattribute :: pygit2.Commit.commit_time
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ Commit_message__get__(Commit *commit)
6464}
6565
6666
67- PyDoc_STRVAR (Commit__message__doc__ , "Message (bytes)." );
67+ PyDoc_STRVAR (Commit_raw_message__doc__ , "Message (bytes)." );
6868
6969PyObject *
70- Commit__message__get__ (Commit * commit )
70+ Commit_raw_message__get__ (Commit * commit )
7171{
7272 return PyBytes_FromString (git_commit_message (commit -> commit ));
7373}
@@ -195,7 +195,7 @@ Commit_parents__get__(Commit *self)
195195PyGetSetDef Commit_getseters [] = {
196196 GETTER (Commit , message_encoding ),
197197 GETTER (Commit , message ),
198- GETTER (Commit , _message ),
198+ GETTER (Commit , raw_message ),
199199 GETTER (Commit , commit_time ),
200200 GETTER (Commit , commit_time_offset ),
201201 GETTER (Commit , committer ),
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ def test_new_commit_encoding(self):
113113
114114 self .assertEqual (GIT_OBJ_COMMIT , commit .type )
115115 self .assertEqual ('iso-8859-1' , commit .message_encoding )
116- self .assertEqual (message , commit .message )
116+ self .assertEqual (message . encode ( encoding ) , commit .raw_message )
117117 self .assertEqual (12346 , commit .commit_time )
118118 self .assertEqualSignature (committer , commit .committer )
119119 self .assertEqualSignature (author , commit .author )
You can’t perform that action at this time.
0 commit comments