Rename Patch.binary to Patch.is_binary for consistency
This commit is contained in:
parent
b382d3c3c1
commit
50744352d7
@ -161,10 +161,10 @@ PyMemberDef Patch_members[] = {
|
||||
{NULL}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(Patch_binary__doc__, "Binary.");
|
||||
PyDoc_STRVAR(Patch_is_binary__doc__, "True if binary data, False if not.");
|
||||
|
||||
PyObject *
|
||||
Patch_binary__get__(Patch *self)
|
||||
Patch_is_binary__get__(Patch *self)
|
||||
{
|
||||
if (!(self->flags & GIT_DIFF_FLAG_NOT_BINARY) &&
|
||||
(self->flags & GIT_DIFF_FLAG_BINARY))
|
||||
@ -173,7 +173,7 @@ Patch_binary__get__(Patch *self)
|
||||
}
|
||||
|
||||
PyGetSetDef Patch_getseters[] = {
|
||||
GETTER(Patch, binary),
|
||||
GETTER(Patch, is_binary),
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
@ -175,7 +175,7 @@ class DiffTest(utils.BareRepoTestCase):
|
||||
|
||||
self.assertEqual(patch.old_file_path, 'a')
|
||||
self.assertEqual(patch.new_file_path, 'a')
|
||||
self.assertEqual(patch.binary, False)
|
||||
self.assertEqual(patch.is_binary, False)
|
||||
|
||||
_test(commit_a.tree.diff_to_tree(commit_b.tree))
|
||||
_test(self.repo.diff(COMMIT_SHA1_1, COMMIT_SHA1_2))
|
||||
|
Loading…
Reference in New Issue
Block a user