tibirna / qgit

Official git repository for QGit.
Other
175 stars 68 forks source link

Use libgit2 library #72

Open eraxillan opened 5 years ago

eraxillan commented 5 years ago

Hi, i've used qgit for years and want to make it better.

Currently qgit calling git as external process and parsing it's output.
It works, but this way is slow and potentially very buggy: we depends from OS process execution mechanics and git version at least.

The most powerful git GUI GitKraken use special library: libgit2.
It is a low-level and lightweight library written in pure C, with minimum dependencies. Can libgit2 be useful to qgit? or maybe calling git process was intentional and "by design", and no other way is needed?

However, i will play with libgit2 for my own purposes. And i can try to integrate to qgit if it will make sense.

P.S. external libraries be used thru e.g. Conan or just bundling it sources as git submodule.

tibirna commented 5 years ago

Hey @eraxillan

Thank you for your interest in qgit and for having long used it.

Re-engineering qgit's parsing (and, more generally, qgit's data handling and modernizing its UI) is a long-standing wish of mine. Lacking time though...

Reason for direct git log parsing is, I guess (I never directly discussed with Marco Costalba, original author), the fact that at the time of first writing qgit 12+ years ago, parsing git log was the only way to do thing. libgit (let alone libgit2) did not exist at the time.

I myself looked at libgit2 3-4 years ago and I found that, at that time, it was not necessarily suited to qgit's needs. I know that it greatly evolved in the following years, so I think I will need to give it another look.

Otherwise, yes, it was my intention to rely on existing (and tested) libraries for git repo data handling going further.

That said, my time available for free software development is very limited at the time. Any contribution is wholeheartedly welcomed.

eraxillan commented 5 years ago

Hi Christian! Well, i just forgot that qgit is so old :) It is obvious you can't use tool which just don't exist yet.

I plan to integrate libgit2 by small steps in my qgit fork, in special branch. First of all, implement git status. There is an example status.c on official libgit2 site. I don't require any coding from you - just some advices based on your experience. First one i've already got - libgit2 should be examined.