Skip to content

Commit b55650e

Browse files
committed
commit: rename Commit._message to Commit.raw_message
1 parent 6d87567 commit b55650e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/objects.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

src/commit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

6969
PyObject *
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)
195195
PyGetSetDef 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),

test/test_commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)