librelist archives

« back to archive

Helping out with libqgit2 bindings

Helping out with libqgit2 bindings

From:
Andrew Mason
Date:
2011-04-28 @ 14:13
Hi All,
Recently I started a project which used the libqgit2 bindings for libgit2, 
however I was informed by the current maintainer that he was too busy to 
maintain compatibility with the API for the forseeable future so I'm 
attempting to help. However, i've not much experience and the git internals  
is a decent learning curve, so I am reaching out to the list for a bit of 
temporary assistance while i become familiar with Qt, C++ and Git. 

When attempting to compile libqgit2 I get this amongst many errors: 

./Qtig/libqgit2/src/treeentry.cpp:26:1: error: prototype for 
‘LibQGit2::TreeEntry::TreeEntry(const git_tree_entry*)’ does not match any in 
class ‘LibQGit2::TreeEntry’

I understand the API has changed and it looks git_tree_entry no longer exists 
in the api. Can anyone provide me some information about what a tree_entry was 
or did and why and what it was replaced with. 

Apologies if this is trivial. I understand the general concept of a blob 
object, tree object and the commits and how they tie in but I've not come 
across the term tree entry before. 

Thanks in advance 
Andrew

Re: [libgit2] Helping out with libqgit2 bindings

From:
Carlos Martín Nieto
Date:
2011-04-28 @ 14:46
On Thu, Apr 28, 2011 at 11:43:45PM +0930, Andrew Mason wrote:
> Hi All,
> Recently I started a project which used the libqgit2 bindings for libgit2, 
> however I was informed by the current maintainer that he was too busy to 
> maintain compatibility with the API for the forseeable future so I'm 
> attempting to help. However, i've not much experience and the git internals  
> is a decent learning curve, so I am reaching out to the list for a bit of 
> temporary assistance while i become familiar with Qt, C++ and Git. 
> 
> When attempting to compile libqgit2 I get this amongst many errors: 
> 
> ./Qtig/libqgit2/src/treeentry.cpp:26:1: error: prototype for 
> ‘LibQGit2::TreeEntry::TreeEntry(const git_tree_entry*)’ does not match any in 
> class ‘LibQGit2::TreeEntry’
> 
> I understand the API has changed and it looks git_tree_entry no longer exists 
> in the api. Can anyone provide me some information about what a tree_entry was 
> or did and why and what it was replaced with. 

The commit [0] may help you figure out what you need to know about the
API changes. I haven't used C++ in a long time, but it looks to me
like you may be missing the declaration for that particular
constructor in the header.

> 
> Apologies if this is trivial. I understand the general concept of a blob 
> object, tree object and the commits and how they tie in but I've not come 
> across the term tree entry before. 

There is the gitglossary man-page which helps clear up some of the
terms (though sadly tree entry isn't there as such). As I understand
it, a tree entry is refers to a particular file in a tree (directory),
which so you can think about it as a file at a particular point in time.

[0] 
https://github.com/libgit2/libgit2/commit/72a3fe42fb7208712bbe8f0981f4c6274c05e9c3

Cheers,
   cmn

Re: [libgit2] Helping out with libqgit2 bindings

From:
Emeric Fermas
Date:
2011-04-28 @ 20:11
>As I understand
> it, a tree entry is refers to a particular file in a tree (directory),
> which so you can think about it as a file at a particular point in time.

From my understanding a TreeEntry refers to a particular *entry* in a
tree (directory) which *could either be a Tree (a sub directory) or a
Blob (a file)* at a particular point in time.

Cheers,
Em.

Re: [libgit2] Helping out with libqgit2 bindings

From:
Andrew Mason
Date:
2011-05-02 @ 13:14
On Friday, April 29, 2011 05:41:28 AM Emeric Fermas wrote:
> >As I understand
> >
> > it, a tree entry is refers to a particular file in a tree (directory),
> > which so you can think about it as a file at a particular point in time.
> >
> >From my understanding a TreeEntry refers to a particular *entry* in a
> 
> tree (directory) which *could either be a Tree (a sub directory) or a
> Blob (a file)* at a particular point in time.
> 

Thank you Carlos and Emeric. I have a better understanding of it now and I 
believe (as Carlos pointed out ) that i was indeed missing the header file, it 
appears that in the C files it's now located in the Tree.h . 

Still got a few compiler errors but I'm getting there =)