commit: rename Commit._message to Commit.raw_message
This commit is contained in:
parent
6d87567e0f
commit
b55650e093
@ -216,6 +216,7 @@ committer and others.
|
||||
.. autoattribute:: pygit2.Commit.committer
|
||||
.. autoattribute:: pygit2.Commit.message
|
||||
.. autoattribute:: pygit2.Commit.message_encoding
|
||||
.. autoattribute:: pygit2.Commit.raw_message
|
||||
.. autoattribute:: pygit2.Commit.tree
|
||||
.. autoattribute:: pygit2.Commit.parents
|
||||
.. autoattribute:: pygit2.Commit.commit_time
|
||||
|
@ -64,10 +64,10 @@ Commit_message__get__(Commit *commit)
|
||||
}
|
||||
|
||||
|
||||
PyDoc_STRVAR(Commit__message__doc__, "Message (bytes).");
|
||||
PyDoc_STRVAR(Commit_raw_message__doc__, "Message (bytes).");
|
||||
|
||||
PyObject *
|
||||
Commit__message__get__(Commit *commit)
|
||||
Commit_raw_message__get__(Commit *commit)
|
||||
{
|
||||
return PyBytes_FromString(git_commit_message(commit->commit));
|
||||
}
|
||||
@ -195,7 +195,7 @@ Commit_parents__get__(Commit *self)
|
||||
PyGetSetDef Commit_getseters[] = {
|
||||
GETTER(Commit, message_encoding),
|
||||
GETTER(Commit, message),
|
||||
GETTER(Commit, _message),
|
||||
GETTER(Commit, raw_message),
|
||||
GETTER(Commit, commit_time),
|
||||
GETTER(Commit, commit_time_offset),
|
||||
GETTER(Commit, committer),
|
||||
|
@ -113,7 +113,7 @@ class CommitTest(utils.BareRepoTestCase):
|
||||
|
||||
self.assertEqual(GIT_OBJ_COMMIT, commit.type)
|
||||
self.assertEqual('iso-8859-1', commit.message_encoding)
|
||||
self.assertEqual(message, commit.message)
|
||||
self.assertEqual(message.encode(encoding), commit.raw_message)
|
||||
self.assertEqual(12346, commit.commit_time)
|
||||
self.assertEqualSignature(committer, commit.committer)
|
||||
self.assertEqualSignature(author, commit.author)
|
||||
|
Loading…
Reference in New Issue
Block a user