| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| cl_assert_equal_s(custom_name, git_libgit2__user_agent()); | ||
|
|
||
| git_libgit2_opts(GIT_OPT_GET_USER_AGENT, &buf); | ||
| cl_assert_equal_s(custom_name, buf.ptr); |
There was a problem hiding this comment.
Please add a git_buf_free(&buf) here to free the memory.
Sorry, something went wrong.
|
This is great to have, thanks for adding this. I added two comments inline. |
Sorry, something went wrong.
|
I added the freeing at the end, not directly on the line, so it frees but the comment is still shown. |
Sorry, something went wrong.
|
Perfect, can you squash this down into a single commit and then I'll merge it! 😀 |
Sorry, something went wrong.
|
Your wish is my desire. Is there a place to document this added functionality? |
Sorry, something went wrong.
|
Yes, thanks for reminding me! Please add this to the CHANGELOG.md. :D |
Sorry, something went wrong.
|
|
||
| * You can now get the user-agent used by libgit2 using the | ||
| `GIT_OPT_GET_USER_AGENT` option with `git_libgit2_opts()`. | ||
| It is the counterpart to `GIT_OPT_SET_USER_AGENT`. |
There was a problem hiding this comment.
👍
Sorry, something went wrong.
|
Awesome, thanks again! ✨ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When exposing the set user agent functionality in the C# binding we saw that we can't really write a good test for whether we set it correctly since getting the set user agent is not possible.
This adds the possibility to get the user agent.