Uh oh!
There was an error while loading. Please reload this page.
Avoid internal git-buf API where possible - #344
Conversation
Move them before git2r headers, use angle-brackets to differentiate public headers, and remove some extraneous includes. Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
This reduces the need to use internal libgit2 functions. Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
The public API is to use the `.ptr` struct entry directly. Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
stewid
commented
May 3, 2018
Thanks for fixing the git-buf usage and the libgit2 headers. I have a question regarding the angle-brackets. They affect the search path of the C pre-processor and since libgit2 is bundled within git2r, I'm curious about why this change? |
QuLogic
commented
May 3, 2018
Technically they're both implementation defined, but in practice (gcc & msvc), the only difference is that quotes checks the current directory first (followed by The change is mostly a cosmetic one; when I see the angle brackets, I think it's external. Now, in this case it's not actually external, but it helps keep that connotation at least. |
stewid
commented
May 4, 2018
Thanks |
The git-buf API is mostly internal to libgit2. Where an equivalent public API exists, this PR changes to those functions instead. This reduces the chances of breaking changes when updating libgit2 as there is less dependency on internals.
This PR is based on #336, so it looks a bit larger than it really is. The individual commits should be relatively straightforward though.