Some coding-style fixes, like not using tabs
This commit is contained in:
37
src/remote.c
37
src/remote.c
@@ -67,23 +67,32 @@ TransferProgress_dealloc(TransferProgress *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyMemberDef TransferProgress_members[] = {
|
PyMemberDef TransferProgress_members[] = {
|
||||||
RMEMBER(TransferProgress, total_objects, T_UINT, "Total number objects to download"),
|
RMEMBER(TransferProgress, total_objects, T_UINT,
|
||||||
RMEMBER(TransferProgress, indexed_objects, T_UINT, "Objects which have been indexed"),
|
"Total number objects to download"),
|
||||||
RMEMBER(TransferProgress, received_objects, T_UINT, "Objects which have been received up to now"),
|
RMEMBER(TransferProgress, indexed_objects, T_UINT,
|
||||||
RMEMBER(TransferProgress, local_objects, T_UINT, "Local objects which were used to fix the thin pack"),
|
"Objects which have been indexed"),
|
||||||
RMEMBER(TransferProgress, total_deltas, T_UINT, "Total number of deltas in the pack"),
|
RMEMBER(TransferProgress, received_objects, T_UINT,
|
||||||
RMEMBER(TransferProgress, indexed_deltas, T_UINT, "Deltas which have been indexed"),
|
"Objects which have been received up to now"),
|
||||||
/* FIXME: technically this is unsigned, but there's no value for size_t here. */
|
RMEMBER(TransferProgress, local_objects, T_UINT,
|
||||||
RMEMBER(TransferProgress, received_bytes, T_PYSSIZET, "Number of bytes received up to now"),
|
"Local objects which were used to fix the thin pack"),
|
||||||
|
RMEMBER(TransferProgress, total_deltas, T_UINT,
|
||||||
|
"Total number of deltas in the pack"),
|
||||||
|
RMEMBER(TransferProgress, indexed_deltas, T_UINT,
|
||||||
|
"Deltas which have been indexed"),
|
||||||
|
/* FIXME: technically this is unsigned, but there's no value for size_t
|
||||||
|
* here. */
|
||||||
|
RMEMBER(TransferProgress, received_bytes, T_PYSSIZET,
|
||||||
|
"Number of bytes received up to now"),
|
||||||
{NULL},
|
{NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
PyDoc_STRVAR(TransferProgress__doc__, "Progress downloading and indexing data during a fetch");
|
PyDoc_STRVAR(TransferProgress__doc__,
|
||||||
|
"Progress downloading and indexing data during a fetch");
|
||||||
|
|
||||||
PyTypeObject TransferProgressType = {
|
PyTypeObject TransferProgressType = {
|
||||||
PyVarObject_HEAD_INIT(NULL, 0)
|
PyVarObject_HEAD_INIT(NULL, 0)
|
||||||
"_pygit2.TransferProgress", /* tp_name */
|
"_pygit2.TransferProgress", /* tp_name */
|
||||||
sizeof(TransferProgress), /* tp_basicsize */
|
sizeof(TransferProgress), /* tp_basicsize */
|
||||||
0, /* tp_itemsize */
|
0, /* tp_itemsize */
|
||||||
(destructor)TransferProgress_dealloc, /* tp_dealloc */
|
(destructor)TransferProgress_dealloc, /* tp_dealloc */
|
||||||
0, /* tp_print */
|
0, /* tp_print */
|
||||||
@@ -101,7 +110,7 @@ PyTypeObject TransferProgressType = {
|
|||||||
0, /* tp_setattro */
|
0, /* tp_setattro */
|
||||||
0, /* tp_as_buffer */
|
0, /* tp_as_buffer */
|
||||||
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
||||||
TransferProgress__doc__, /* tp_doc */
|
TransferProgress__doc__, /* tp_doc */
|
||||||
0, /* tp_traverse */
|
0, /* tp_traverse */
|
||||||
0, /* tp_clear */
|
0, /* tp_clear */
|
||||||
0, /* tp_richcompare */
|
0, /* tp_richcompare */
|
||||||
@@ -232,7 +241,7 @@ Remote_name__set__(Remote *self, PyObject* py_name)
|
|||||||
name = py_str_borrow_c_str(&tname, py_name, NULL);
|
name = py_str_borrow_c_str(&tname, py_name, NULL);
|
||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
err = git_remote_rename(self->remote, name, NULL, NULL);
|
err = git_remote_rename(self->remote, name, NULL, NULL);
|
||||||
Py_DECREF(tname);
|
Py_DECREF(tname);
|
||||||
|
|
||||||
if (err == GIT_OK)
|
if (err == GIT_OK)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -412,7 +421,7 @@ Remote_url__set__(Remote *self, PyObject* py_url)
|
|||||||
url = py_str_borrow_c_str(&turl, py_url, NULL);
|
url = py_str_borrow_c_str(&turl, py_url, NULL);
|
||||||
if (url != NULL) {
|
if (url != NULL) {
|
||||||
err = git_remote_set_url(self->remote, url);
|
err = git_remote_set_url(self->remote, url);
|
||||||
Py_DECREF(turl);
|
Py_DECREF(turl);
|
||||||
|
|
||||||
if (err == GIT_OK)
|
if (err == GIT_OK)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -449,7 +458,7 @@ Remote_push_url__set__(Remote *self, PyObject* py_url)
|
|||||||
url = py_str_borrow_c_str(&turl, py_url, NULL);
|
url = py_str_borrow_c_str(&turl, py_url, NULL);
|
||||||
if (url != NULL) {
|
if (url != NULL) {
|
||||||
err = git_remote_set_pushurl(self->remote, url);
|
err = git_remote_set_pushurl(self->remote, url);
|
||||||
Py_DECREF(turl);
|
Py_DECREF(turl);
|
||||||
|
|
||||||
if (err == GIT_OK)
|
if (err == GIT_OK)
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -333,7 +333,7 @@ Repository_revparse_single(Repository *self, PyObject *py_spec)
|
|||||||
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
PyObject *err_obj = Error_set_str(err, c_spec);
|
PyObject *err_obj = Error_set_str(err, c_spec);
|
||||||
Py_DECREF(tspec);
|
Py_DECREF(tspec);
|
||||||
return err_obj;
|
return err_obj;
|
||||||
}
|
}
|
||||||
Py_DECREF(tspec);
|
Py_DECREF(tspec);
|
||||||
@@ -1051,7 +1051,7 @@ Repository_lookup_reference(Repository *self, PyObject *py_name)
|
|||||||
err = git_reference_lookup(&c_reference, self->repo, c_name);
|
err = git_reference_lookup(&c_reference, self->repo, c_name);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
PyObject *err_obj = Error_set_str(err, c_name);
|
PyObject *err_obj = Error_set_str(err, c_name);
|
||||||
free(c_name);
|
free(c_name);
|
||||||
return err_obj;
|
return err_obj;
|
||||||
}
|
}
|
||||||
free(c_name);
|
free(c_name);
|
||||||
|
Reference in New Issue
Block a user