PEP-7: function name in column 1
http://www.python.org/dev/peps/pep-0007/#code-lay-out
This commit is contained in:
15
src/branch.c
15
src/branch.c
@@ -89,7 +89,8 @@ PyDoc_STRVAR(Branch_rename__doc__,
|
||||
"checked for validity.\n"
|
||||
"Returns the new branch.");
|
||||
|
||||
PyObject* Branch_rename(Branch *self, PyObject *args)
|
||||
PyObject *
|
||||
Branch_rename(Branch *self, PyObject *args)
|
||||
{
|
||||
int err, force = 0;
|
||||
git_reference *c_out;
|
||||
@@ -111,7 +112,8 @@ PyObject* Branch_rename(Branch *self, PyObject *args)
|
||||
PyDoc_STRVAR(Branch_branch_name__doc__,
|
||||
"The name of the local or remote branch.");
|
||||
|
||||
PyObject* Branch_branch_name__get__(Branch *self)
|
||||
PyObject *
|
||||
Branch_branch_name__get__(Branch *self)
|
||||
{
|
||||
int err;
|
||||
const char *c_name;
|
||||
@@ -129,7 +131,8 @@ PyObject* Branch_branch_name__get__(Branch *self)
|
||||
PyDoc_STRVAR(Branch_remote_name__doc__,
|
||||
"The name of the remote that the remote tracking branch belongs to.");
|
||||
|
||||
PyObject* Branch_remote_name__get__(Branch *self)
|
||||
PyObject *
|
||||
Branch_remote_name__get__(Branch *self)
|
||||
{
|
||||
int err;
|
||||
const char *branch_name;
|
||||
@@ -168,7 +171,8 @@ PyDoc_STRVAR(Branch_upstream__doc__,
|
||||
"The branch supporting the remote tracking branch or None if this is not a "
|
||||
"remote tracking branch. Set to None to unset.");
|
||||
|
||||
PyObject* Branch_upstream__get__(Branch *self)
|
||||
PyObject *
|
||||
Branch_upstream__get__(Branch *self)
|
||||
{
|
||||
int err;
|
||||
git_reference *c_reference;
|
||||
@@ -218,7 +222,8 @@ int Branch_upstream__set__(Branch *self, Reference *py_ref)
|
||||
PyDoc_STRVAR(Branch_upstream_name__doc__,
|
||||
"The name of the reference supporting the remote tracking branch.");
|
||||
|
||||
PyObject* Branch_upstream_name__get__(Branch *self)
|
||||
PyObject *
|
||||
Branch_upstream_name__get__(Branch *self)
|
||||
{
|
||||
int err;
|
||||
const char *branch_name;
|
||||
|
15
src/error.c
15
src/error.c
@@ -29,7 +29,8 @@
|
||||
|
||||
PyObject *GitError;
|
||||
|
||||
PyObject * Error_type(int type)
|
||||
PyObject *
|
||||
Error_type(int type)
|
||||
{
|
||||
const git_error* error;
|
||||
/* Expected */
|
||||
@@ -79,14 +80,16 @@ PyObject * Error_type(int type)
|
||||
}
|
||||
|
||||
|
||||
PyObject* Error_set(int err)
|
||||
PyObject *
|
||||
Error_set(int err)
|
||||
{
|
||||
assert(err < 0);
|
||||
|
||||
return Error_set_exc(Error_type(err));
|
||||
}
|
||||
|
||||
PyObject* Error_set_exc(PyObject* exception)
|
||||
PyObject *
|
||||
Error_set_exc(PyObject* exception)
|
||||
{
|
||||
const git_error* error = giterr_last();
|
||||
char* message = (error == NULL) ?
|
||||
@@ -97,7 +100,8 @@ PyObject* Error_set_exc(PyObject* exception)
|
||||
}
|
||||
|
||||
|
||||
PyObject* Error_set_str(int err, const char *str)
|
||||
PyObject *
|
||||
Error_set_str(int err, const char *str)
|
||||
{
|
||||
const git_error* error;
|
||||
if (err == GIT_ENOTFOUND) {
|
||||
@@ -113,7 +117,8 @@ PyObject* Error_set_str(int err, const char *str)
|
||||
return PyErr_Format(Error_type(err), "%s: %s", str, error->message);
|
||||
}
|
||||
|
||||
PyObject* Error_set_oid(int err, const git_oid *oid, size_t len)
|
||||
PyObject *
|
||||
Error_set_oid(int err, const git_oid *oid, size_t len)
|
||||
{
|
||||
char hex[GIT_OID_HEXSZ + 1];
|
||||
|
||||
|
@@ -49,7 +49,8 @@ void RefLogIter_dealloc(RefLogIter *self)
|
||||
PyObject_Del(self);
|
||||
}
|
||||
|
||||
PyObject* RefLogIter_iternext(RefLogIter *self)
|
||||
PyObject *
|
||||
RefLogIter_iternext(RefLogIter *self)
|
||||
{
|
||||
const git_reflog_entry *entry;
|
||||
RefLogEntry *py_entry;
|
||||
|
@@ -96,7 +96,8 @@ Remote_name__set__(Remote *self, PyObject* py_name)
|
||||
}
|
||||
|
||||
|
||||
PyObject * get_pylist_from_git_strarray(git_strarray *strarray)
|
||||
PyObject *
|
||||
get_pylist_from_git_strarray(git_strarray *strarray)
|
||||
{
|
||||
int index;
|
||||
PyObject *new_list;
|
||||
|
@@ -866,7 +866,8 @@ PyDoc_STRVAR(Repository_create_branch__doc__,
|
||||
"\n"
|
||||
" repo.create_branch('foo', repo.head.hex, force=False)");
|
||||
|
||||
PyObject* Repository_create_branch(Repository *self, PyObject *args)
|
||||
PyObject *
|
||||
Repository_create_branch(Repository *self, PyObject *args)
|
||||
{
|
||||
Commit *py_commit;
|
||||
git_reference *c_reference;
|
||||
@@ -1467,7 +1468,8 @@ PyDoc_STRVAR(Repository_blame__doc__,
|
||||
"\n"
|
||||
" repo.blame('foo.c', flags=GIT_BLAME_TRACK_COPIES_SAME_FILE)");
|
||||
|
||||
PyObject* Repository_blame(Repository *self, PyObject *args, PyObject *kwds)
|
||||
PyObject *
|
||||
Repository_blame(Repository *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
|
||||
git_blame *blame;
|
||||
|
Reference in New Issue
Block a user