Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 07 Jun 2015 21:25:33 UTC Commit: 111528e5603b217ed39d5ddf6d87ac0488e81efb https://github.com/geany/geany-plugins/commit/111528e5603b217ed39d5ddf6d87ac...
Log Message: ----------- git-changebar: Fix spurious diff on last line with some files
Work around a libgit2 bug leading to missing last byte on some blobs. See https://github.com/libgit2/libgit2/pull/3187
Modified Paths: -------------- git-changebar/src/gcb-plugin.c
Modified: git-changebar/src/gcb-plugin.c 17 lines changed, 17 insertions(+), 0 deletions(-) =================================================================== @@ -179,6 +179,23 @@ static const struct { };
+/* workaround https://github.com/libgit2/libgit2/pull/3187 */ +static int +gcb_git_buf_grow (git_buf *buf, + size_t target_size) +{ + if (buf->asize == 0) { + if (target_size == 0) { + target_size = buf->size; + } + if ((target_size & 7) == 0) { + target_size++; + } + } + return git_buf_grow (buf, target_size); +} +#define git_buf_grow gcb_git_buf_grow + static void buf_zero (git_buf *buf) {
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org