Add Blame support #285

Merged
merged 1 commit into from Nov 23, 2013

3 participants

@petrhosek

Exposes the Blame API which is being implemented in libgit2/libgit2#1317.

@aspiers

I tried to build this against latest git master of libgit2 but I got:

running build
running build_py
running build_ext
building '_pygit2' extension
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I/home/adam/include -Iinclude -I/usr/include/python2.7 -c src/commit.c -o build/temp.linux-x86_64-2.7/src/commit.o
In file included from /usr/include/python2.7/Python.h:80:0,
                 from src/commit.c:29:
/usr/include/python2.7/object.h:81:12: error: unknown type name ‘git_diff_list’
     struct _typeobject *ob_type;
            ^
src/types.h:57:13: note: in expansion of macro ‘PyObject_HEAD’
             PyObject_HEAD\
             ^
src/types.h:98:1: note: in expansion of macro ‘SIMPLE_TYPE’
 SIMPLE_TYPE(Diff, git_diff_list, list)
 ^
error: command 'gcc' failed with exit status 1

It looks like the diff API changed in libgit2 and git_diff_list was superceded by git_diff.

Any ideas?

@petrhosek

Blame API is only available in development branch of libgit2; I was using @carlosmn development branch of pygit2 which follows the libgit2 development branch but there might have already been some changes since then.

According to libgit2/libgit2#1932 there should be 0.20 release any day now. I assume that @carlosmn will merge his development branch of pygit2 into master immediately afterwards and once that happens, I will rebase my change to make sure it could be merged into pygit2 master.

@aspiers

Blame API is only available in development branch of libgit2

I know - that's why I said I installed libgit2 master branch from github :)

I was using @carlosmn development branch of pygit2 which follows the libgit2 development branch

Ah OK, I guess that's the information I was missing - thanks :)

Looking forward to seeing this all get finalised soon!

@ghost

that good quality reviews cannot be assumed.véglegesített hamarosan!Thanks ..

@jdavid jdavid merged commit 629e318 into libgit2:master Nov 23, 2013

1 check failed

Details default The Travis CI build failed
@aspiers

Cool to see this merged :) Should it work with the 0.20 release?

@jdavid
libgit2 member

it should

@aspiers aspiers referenced this pull request in aspiers/git-deps Jan 5, 2015
Open

use pygit2's blame support #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment