Open majioa opened 1 year ago
Is there a comment on what this is doing or why? The patch referenced is just the diff.
In case the package libgit2-devel/dev is installed, the headers is picking up from them.
That seems to be the opposite of what path is trying to do. But still, that doesn't tell me what this is trying to fix by searching in both when the options are for rugged to try to pick up either a system-installed libgit2 with the right version, OR use the vendored version.
If you ask it to use the vendred version, then it should use everything from the vendored libgit2. If you ask it to use the system version, then everything should come from the system version.
The logic you're modyfing is for the `--use system libraries" logic. If there is a libgit2 installed then it should only look at it. Looking at it now, it does look like it could buggy and it might be at the vendored header instead of the system header that was found. But then that's what needs to get fixed.
I was misreading the code. The code you are modifying does want to look at the vendored version there. What it's doing is extracting the version of libgit2 that's compatible with the version of rugged that's getting compiled. Looking at the system header instead would invalidate any verification, as it would be verifying that the installed version matches the installed version.
may be there is a sense to add "enable system library" explicitly like in nokogiri gem