[Github-comments] [geany/geany-plugins] GitChangeBar: Support libgit2 1.4.x (PR #1165)

Enrico Tröger notifications at github.com
Sun Apr 10 19:53:42 UTC 2022


Good point.

I think it could be ok, `git_buf_grow` is called only once in the code directly and in all cases I've tested the `asize` field was non-zero, i.e. the `git_buf` instance was allocated by libgit2 and so the custom code in `gcb_git_buf_grow` was never used.

However, either I'm wrong or there was a previous use case where this was necessary. As long as I don't know this, it's hard to say what's correct.
Interestingly, newer versions of libgit2 (I think it was since 0.23 or so) even do not allow using `git_buf_grow` with a custom allocated buffer and raise an error instead. So if the plugin would use a custom allocated buffer, we probably would see errors (or at least warnings in the logs). Or I misunderstood the code.

Anyway, I can't spend more time on this.

Maybe someone else wants (@b4n?).



-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/1165#issuecomment-1094357348
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany-plugins/pull/1165/c1094357348 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220410/8a620d8b/attachment.htm>


More information about the Github-comments mailing list