[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Re: Review Request 120177: project plugin: use libgit2 instead of calling git command to read the fi
From: "Andreas Pakulat" <apaku () gmx ! de>
Date: 2014-09-15 17:21:29
Message-ID: 20140915172129.22585.23302 () probe ! kde ! org
[Download RAW message or body]
--===============1568981514152846920==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
On Sept. 15, 2014, 2:34 p.m., Michal Humpula wrote:
> > 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".
>
> Christoph Cullmann wrote:
> Actually its more about portability, as on Windows, its much easier to have this on \
> compile time linked against the lib than to require the user has the right \
> shell/git/... available.
> Aleix Pol Gonzalez wrote:
> I see, I hadn't considered it. Will follow how it works closely then, seems it \
> could be useful for KDevelop as well.
It may be more portable, at the expense of having less features/bugfixes and a \
different set of bugs. I'm not saying using libgit2 is a bad idea, but setting up git \
on windows is almost as easy as installing it on linux: You download 1 executable, \
run through the installer and thats it (at most you log out and back in). By default \
the installer adds git to PATH already.
Its also easier to add ssh support to plain git, merely requires installing putty (or \
knowing how to use/setup the ssh thats shipped with git itself). libgit2 requires a \
rebuild of the library. And I can't see any binary downloads for it either (meaning \
it has to be shipped with kate on windows and macosx).
Whats nice about libgit2 is that it actually uses the native windows API \
'correctly'/properly which is said to give it better performance on Windows in some \
cases.
- Andreas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120177/#review66558
-----------------------------------------------------------
On Sept. 14, 2014, 10:29 a.m., Michal Humpula wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120177/
> -----------------------------------------------------------
>
> (Updated Sept. 14, 2014, 10:29 a.m.)
>
>
> Review request for Kate.
>
>
> Repository: kate
>
>
> Description
> -------
>
> 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.
>
> Diffs
> -----
>
> addons/project/kateprojectworker.cpp e760fab
> addons/project/CMakeLists.txt e12bfbb
> addons/project/cmake/FindGIT2.cmake PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/120177/diff/
>
>
> Testing
> -------
>
> manual testing
> * combination with autodetection
> * classic .kateproject file
> * .kateproject file with "directory" entry
>
>
> Thanks,
>
> Michal Humpula
>
>
--===============1568981514152846920==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/120177/">https://git.reviewboard.kde.org/r/120177/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On September 15th, 2014, 2:34 p.m. UTC, <b>Aleix \
Pol Gonzalez</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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".</p></pre> </blockquote>
<p>On September 15th, 2014, 2:37 p.m. UTC, <b>Christoph Cullmann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Actually its more about portability, as on Windows, its much easier to have \
this on compile time linked against the lib than to require the user has the right \
shell/git/... available.</p></pre> </blockquote>
<p>On September 15th, 2014, 3:49 p.m. UTC, <b>Aleix Pol Gonzalez</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
see, I hadn't considered it. Will follow how it works closely then, seems it could be \
useful for KDevelop as well.</p></pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It \
may be more portable, at the expense of having less features/bugfixes and a different \
set of bugs. I'm not saying using libgit2 is a bad idea, but setting up git on \
windows is almost as easy as installing it on linux: You download 1 executable, run \
through the installer and thats it (at most you log out and back in). By default the \
installer adds git to PATH already.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Its also easier to add \
ssh support to plain git, merely requires installing putty (or knowing how to \
use/setup the ssh thats shipped with git itself). libgit2 requires a rebuild of the \
library. And I can't see any binary downloads for it either (meaning it has to be \
shipped with kate on windows and macosx).</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Whats nice about \
libgit2 is that it actually uses the native windows API 'correctly'/properly which is \
said to give it better performance on Windows in some cases.</p></pre> <br />
<p>- Andreas</p>
<br />
<p>On September 14th, 2014, 10:29 a.m. UTC, Michal Humpula wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Kate.</div>
<div>By Michal Humpula.</div>
<p style="color: grey;"><i>Updated Sept. 14, 2014, 10:29 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">manual testing<br style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;" /> <em style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> \
combination with autodetection<br style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;" /> </em> classic .kateproject file<br \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;" />
* .kateproject file with "directory" entry</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>addons/project/kateprojectworker.cpp <span style="color: \
grey">(e760fab)</span></li>
<li>addons/project/CMakeLists.txt <span style="color: grey">(e12bfbb)</span></li>
<li>addons/project/cmake/FindGIT2.cmake <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120177/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============1568981514152846920==--
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic