Skip to content

Conversation

t3rm1n4l
Copy link
Contributor

@t3rm1n4l t3rm1n4l commented Apr 5, 2011

Invoke tree = index.create_tree() to create a tree from index file and return Tree object.

t3rm1n4l added 2 commits April 5, 2011 19:16
Invoke tree = index.create_tree() to create a tree from index file and return Tree object.
@jdavid
Copy link
Member

jdavid commented Apr 6, 2011

This is cool, I need this feature very much.

Some remarks:

  • PyObject_New will return NULL on error, handle this case
  • git_tree_lookup may also return an error code. Well, maybe not in this particular case,
    (did not check the implementation), but it would be safer to check the error code anyway.
  • there is a reference counting error, refcount must be increased for the repo,
    add the line "Py_INCREF(self->repo);"
  • coding style: there is a mix of spaces and tabs, use 4 spaces for each indentation
    level, both in the C and Python files
  • coding style: there is whitespace at the end of a line in pygit2.c

Thank you very much.

@t3rm1n4l
Copy link
Contributor Author

t3rm1n4l commented Apr 6, 2011

Thank you :)
I will be careful about your notes for the next commit.

@t3rm1n4l t3rm1n4l closed this Apr 6, 2011
@t3rm1n4l
Copy link
Contributor Author

t3rm1n4l commented Apr 6, 2011

I will send another commit with corrections tommorrow.

xtao added a commit to douban/pygit2 that referenced this pull request Oct 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants