How to see if git binary is using openssl or gnutls?

徘徊边缘 提交于 2019-12-01 22:13:08
$ cd /usr/lib/git-core
$ ./git --version
git version 1.9.1
$ ldd git-http-fetch | grep libcurl
    libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f8d5dcdf000)

$ cd /usr/libexec/git-core
$ ./git --version
git version 2.8.1
$ ldd git-http-fetch | grep libcurl
    libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f6bd1e42000)

So apparently both my operating-system supplied version and my self-compiled version are against gnutls.

Edit: this is what openssl output looks like when the same command is run, there is no libcurl-gnutls, but

libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fe96267e000)

Edit2: looking at this answer, seems git at runtime is just using whatever libcurl the system is set up to use, so my question was a bit misleading. Anyway, this answer is correct in the sense that it will tell which one is being used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!