From 403c48210ad77bfe61e1acf2c5012ecec6f45655 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 18 Feb 2022 08:54:29 -0500 Subject: meta: show build status for v1.3 and v1.4 branches --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1074cd9a8..c73b50701 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ libgit2 - the Git linkable library | Build Status | | | ------------ | - | | **main** branch CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush) | -| **v1.2 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.2&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.2) | -| **v1.1 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.1&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.1) | +| **v1.4 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.4&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.4) | +| **v1.3 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.3&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.3) | | **Nightly** builds | [![Nightly Build](https://github.com/libgit2/libgit2/workflows/Nightly%20Build/badge.svg)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22Nightly+Build%22) [![Coverity Scan Status](https://scan.coverity.com/projects/639/badge.svg)](https://scan.coverity.com/projects/639) | `libgit2` is a portable, pure C implementation of the Git core methods -- cgit v1.2.1 From f2cce1c74067c48abac04a1e967b48723226efab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 13 Feb 2022 21:23:56 +0100 Subject: cmake: Fix package name for system http-parser Fix building against system http-parser library by fixing the find_package() argument. It seems to have been accidentally changed from HTTPParser to HTTP_Parser in de178d36f, effectively making the build against system library fail to find it: ``` CMake Warning at cmake/SelectHTTPParser.cmake:3 (find_package): By not providing "FindHTTP_Parser.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "HTTP_Parser", but CMake did not find one. Could not find a package configuration file provided by "HTTP_Parser" with any of the following names: HTTP_ParserConfig.cmake http_parser-config.cmake Add the installation prefix of "HTTP_Parser" to CMAKE_PREFIX_PATH or set "HTTP_Parser_DIR" to a directory containing one of the above files. If "HTTP_Parser" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:97 (include) CMake Error at cmake/SelectHTTPParser.cmake:11 (message): http-parser support was requested but not found Call Stack (most recent call first): src/CMakeLists.txt:97 (include) ``` --- cmake/SelectHTTPParser.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/SelectHTTPParser.cmake b/cmake/SelectHTTPParser.cmake index bb6ef5517..955aea330 100644 --- a/cmake/SelectHTTPParser.cmake +++ b/cmake/SelectHTTPParser.cmake @@ -1,6 +1,6 @@ # Optional external dependency: http-parser if(USE_HTTP_PARSER STREQUAL "system") - find_package(HTTP_Parser) + find_package(HTTPParser) if(HTTP_PARSER_FOUND AND HTTP_PARSER_VERSION_MAJOR EQUAL 2) list(APPEND LIBGIT2_SYSTEM_INCLUDES ${HTTP_PARSER_INCLUDE_DIRS}) -- cgit v1.2.1 From f4cc03bb205ca8e0159da1012e583a87f71daca2 Mon Sep 17 00:00:00 2001 From: "Ashok P. Nadkarni" Date: Mon, 14 Feb 2022 13:57:07 +0530 Subject: Free parent and ref in lg2_commit before returning. --- examples/commit.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/commit.c b/examples/commit.c index cd9782de1..aedc1af7e 100644 --- a/examples/commit.c +++ b/examples/commit.c @@ -26,7 +26,7 @@ * This does have: * * - Example of performing a git commit with a comment - * + * */ int lg2_commit(git_repository *repo, int argc, char **argv) { @@ -36,10 +36,10 @@ int lg2_commit(git_repository *repo, int argc, char **argv) git_oid commit_oid,tree_oid; git_tree *tree; - git_index *index; + git_index *index; git_object *parent = NULL; git_reference *ref = NULL; - git_signature *signature; + git_signature *signature; /* Validate args */ if (argc < 3 || strcmp(opt, "-m") != 0) { @@ -62,9 +62,9 @@ int lg2_commit(git_repository *repo, int argc, char **argv) check_lg2(git_index_write(index), "Could not write index", NULL);; check_lg2(git_tree_lookup(&tree, repo, &tree_oid), "Error looking up tree", NULL); - + check_lg2(git_signature_default(&signature, repo), "Error creating signature", NULL); - + check_lg2(git_commit_create_v( &commit_oid, repo, @@ -78,7 +78,9 @@ int lg2_commit(git_repository *repo, int argc, char **argv) git_index_free(index); git_signature_free(signature); - git_tree_free(tree); + git_tree_free(tree); + git_object_free(parent); + git_reference_free(ref); return error; } -- cgit v1.2.1 From 2575134dac7b92ea2defbcc74f778a69324fcc67 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 17 Feb 2022 13:55:34 -0500 Subject: xdiff: use xdl_free not free We've added a lovely abstraction layer in xdiff so that it can call our allocation functions. But it also needs to call our free functions. We missed some `free` calls in `xmerge.c`. Update them to use `xdl_free`. Without this, we will pass a pointer allocated with a custom allocator to the system free function. :bomb: --- src/xdiff/xdiff.h | 4 ++-- src/xdiff/xmerge.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xdiff/xdiff.h b/src/xdiff/xdiff.h index a7bf17cd6..fb47f63fb 100644 --- a/src/xdiff/xdiff.h +++ b/src/xdiff/xdiff.h @@ -23,12 +23,12 @@ #if !defined(XDIFF_H) #define XDIFF_H -#include "git-xdiff.h" - #ifdef __cplusplus extern "C" { #endif /* #ifdef __cplusplus */ +#include "git-xdiff.h" + /* xpparm_t.flags */ #define XDF_NEED_MINIMAL (1 << 0) diff --git a/src/xdiff/xmerge.c b/src/xdiff/xmerge.c index fff0b594f..433e2d741 100644 --- a/src/xdiff/xmerge.c +++ b/src/xdiff/xmerge.c @@ -88,7 +88,7 @@ static int xdl_cleanup_merge(xdmerge_t *c) if (c->mode == 0) count++; next_c = c->next; - free(c); + xdl_free(c); } return count; } @@ -456,7 +456,7 @@ static void xdl_merge_two_conflicts(xdmerge_t *m) m->chg1 = next_m->i1 + next_m->chg1 - m->i1; m->chg2 = next_m->i2 + next_m->chg2 - m->i2; m->next = next_m->next; - free(next_m); + xdl_free(next_m); } /* -- cgit v1.2.1 From ab791c8376d3c1fbdd9e358b6601ebaef3e3ce20 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Fri, 18 Feb 2022 08:56:10 -0500 Subject: meta: update version numbers for v1.4.1 --- include/git2/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/git2/version.h b/include/git2/version.h index 9007ca928..1c5527702 100644 --- a/include/git2/version.h +++ b/include/git2/version.h @@ -7,10 +7,10 @@ #ifndef INCLUDE_git_version_h__ #define INCLUDE_git_version_h__ -#define LIBGIT2_VERSION "1.4.0" +#define LIBGIT2_VERSION "1.4.1" #define LIBGIT2_VER_MAJOR 1 #define LIBGIT2_VER_MINOR 4 -#define LIBGIT2_VER_REVISION 0 +#define LIBGIT2_VER_REVISION 1 #define LIBGIT2_VER_PATCH 0 #define LIBGIT2_SOVERSION "1.4" -- cgit v1.2.1