project plugin: use libgit2 instead of calling git command to read the files
Review Request #120177 - Created Sept. 13, 2014 and submitted
Proof of concept for using libgit2 library instad of calling git command and spawning separate process. It's ugly as hell, mostly because of writing C-like style in C++ codebase.
The cmake find was stolen from ktexteditor (thanks Christoph;). I've used the C++11 trick that lambda without closure can be passed as pointer to function. The labels are used in C-style way to simplify free calls. Hence the initialization of all the variables in the start, because otherwise gcc starts to complain.
combination with autodetection
classic .kateproject file
* .kateproject file with "directory" entry
|Maybe it should be called FindLibGit2.cmake? Also any chance we can get this in ECM? It looks like a fork ...||Aleix Pol Gonzalez|
I think the code is ok, beside that I would like more some deeper if nesting than goto's.
I will try to get our FindGIT2 thingy in extra-cmake-modules, then we can remove our copy.
Maybe it should be called FindLibGit2.cmake?
Also any chance we can get this in ECM? It looks like a fork from somewhere else anyway.
Also you don't explain why it's better to use the library than the executable. I guess it's performance, but I also don't know if it was a bottleneck or if it just makes it go "so much faster".