Reconsider using LibGit2Sharp? #974
cidzoo
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Also see #940 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As I now understand, initially the project was using Lib2GitSharp (#256 in 2019) and as been moved to use the (if available) local git installation.
Funnily, without knowing this, I've forked the project a few days ago and try to use Lib2Git (again).
Rationals
My initial needs is to not rely on a local external git dependency. Indeed, I'm doing CI and using some docker images to build my projects. However, they may not all have a git installed. Therefore I has to create custom images for thoses to integrate git. Aside the fact that it was not easy for some of them, it also implies I need to maintain them, rebuild them for new version, etc.
So the main rational for me is to remove an external dependency and thus make MinVer self-contained.
What I've done
So, as stated above, I've already forked the project and tested the switch. It's working fine and all tests are passing except one, but I suspect it is because this particular test is expecting a local git.
My point of view
From my point of view, I think it really make sense to reuse existing code and not reinventing the wheel. To me, the current implementation looks quite "hacky" honestly. Parsing directly some command output is always a bit risky, some substring index are hardcoded, etc. When I switched back to LibGit2Sharp, implementation has been greatly simplified, it was as simple as using a few methods and properties of the lib without any hacky stuff.
Open questions
So I'd like to know if it's still relevant to keep using a local git installation instead of Lib2GitSharp now in 2024? Are the aspects mentioned in the original PR still valid? And also what's your feeling about it?
v0.26.0
v0.29.0
but the related issue Segmentation Fault in Alpine 3.8 libgit2/libgit2sharp#1647 is still open, so not sure if it has been fixed or notBeta Was this translation helpful? Give feedback.
All reactions