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