fixed parameter order for diff functions (libgit2)

This commit is contained in:
Nico von Geyso 2012-11-16 13:04:47 +01:00
parent e3a71d4f41
commit 5262c9e23b
2 changed files with 14 additions and 11 deletions
src/pygit2

@ -117,15 +117,17 @@ Index_diff_tree(Index *self, PyObject *args)
if (py_obj == NULL) {
err = git_diff_workdir_to_index(
&diff,
self->repo->repo,
&opts,
&diff);
self->index,
&opts);
} else if (PyObject_TypeCheck(py_obj, &TreeType)) {
err = git_diff_index_to_tree(
&diff,
self->repo->repo,
&opts,
((Tree *)py_obj)->tree,
&diff);
self->index,
&opts);
} else {
PyErr_SetObject(PyExc_TypeError, py_obj);
return NULL;

@ -279,23 +279,24 @@ Tree_diff_tree(Tree *self, PyObject *args)
if (py_obj == NULL) {
err = git_diff_workdir_to_tree(
&diff,
self->repo->repo,
&opts,
self->tree,
&diff);
&opts);
} else if (PyObject_TypeCheck(py_obj, &TreeType)) {
err = git_diff_tree_to_tree(
&diff,
self->repo->repo,
&opts,
self->tree,
((Tree *)py_obj)->tree,
&diff);
&opts);
} else if (PyObject_TypeCheck(py_obj, &IndexType)) {
err = git_diff_index_to_tree(
((Index *)py_obj)->repo->repo,
&opts,
&diff,
self->repo->repo,
self->tree,
&diff);
((Index *)py_obj)->index,
&opts);
} else {
PyErr_SetObject(PyExc_TypeError, py_obj);
return NULL;