1. 05 Jul, 2019 5 commits
  2. 27 Jun, 2019 1 commit
    • Resolve static check warnings in example code · 2ba7dbbe
      Using cppcheck on libgit2 sources indicated two warnings in
      example code.
      
      merge.c was reported as having a memory leak. Fix applied
      was to `free()` memory pointed to by `parents`.
      
      init.c was reported as having a null pointer dereference
      on variable arg. Function 'usage' was being called with
      a null variable. Changed supplied parameter to empty string.
      Scott Furry committed
  3. 25 Jun, 2019 4 commits
  4. 15 Jun, 2019 1 commit
  5. 14 Jun, 2019 1 commit
    • Rename opt init functions to `options_init` · 0b5ba0d7
      In libgit2 nomenclature, when we need to verb a direct object, we name
      a function `git_directobject_verb`.  Thus, if we need to init an options
      structure named `git_foo_options`, then the name of the function that
      does that should be `git_foo_options_init`.
      
      The previous names of `git_foo_init_options` is close - it _sounds_ as
      if it's initializing the options of a `foo`, but in fact
      `git_foo_options` is its own noun that should be respected.
      
      Deprecate the old names; they'll now call directly to the new ones.
      Edward Thomson committed
  6. 16 Apr, 2019 6 commits
  7. 22 Feb, 2019 1 commit
  8. 15 Feb, 2019 6 commits
  9. 14 Feb, 2019 1 commit
    • deprecation: ensure we GIT_EXTERN deprecated funcs · 24ac9e0c
      Although the error functions were deprecated, we did not properly mark
      them as deprecated.  We need to include the `deprecated.h` file in order
      to ensure that the functions get their export attributes.
      
      Similarly, do not define `GIT_DEPRECATE_HARD` within the library, or
      those functions will also not get their export attributes.  Define that
      only on the tests and examples.
      Edward Thomson committed
  10. 25 Jan, 2019 1 commit
  11. 22 Jan, 2019 1 commit
  12. 17 Jan, 2019 2 commits
  13. 17 Jul, 2018 1 commit
  14. 13 Jul, 2018 3 commits
    • cmake: enforce C90 standard · e1a4a8eb
      While the aim of libgit2 was to conform to C90 code, we never instructed
      the compiler to enforce C90 compliance. Thus, quite a few violations
      were able to get into our code base, which have been removed with the
      previous commits. As we are now able to build libgit2 with C90 enforced,
      we can set the C_STANDARD property for our own build targets.
      
      Note that we explicitly avoid setting the C standard for our third-party
      dependencies. At least the zlib target does not build with C90 enforced,
      and we do not want to fix them by deviating from upstream. Thus we
      simply enforce no standard for them.
      Patrick Steinhardt committed
    • cmake: distinguish internal and system include directories · c13e56f9
      While we want to enforce strict C90 mode, this may cause issues with
      system provided header files which are themselves not strictly
      conforming. E.g. if a system header has C++ style comments, a compiler
      in strict C90 mode would produce an error and abort the build. As the
      user most likely doesn't want to change the system header, this would
      completely break the build on such systems. One example of this is
      mbedtls, which provides such header files.
      
      The problem can be worked around by distinguishing between
      system-provided and project-provided include directories. When adding
      include directories via "-isystem" instead of "-I", the compiler will
      skip certain checks and print out less warnings. To use system includes,
      we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and
      `TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the
      include directories into two variables because of this, as we definitely
      still want to check for all warnings produced by our own header files.
      Patrick Steinhardt committed
    • treewide: remove use of C++ style comments · 9994cd3f
      C++ style comment ("//") are not specified by the ISO C90 standard and
      thus do not conform to it. While libgit2 aims to conform to C90, we did
      not enforce it until now, which is why quite a lot of these
      non-conforming comments have snuck into our codebase. Do a tree-wide
      conversion of all C++ style comments to the supported C style comments
      to allow us enforcing strict C90 compliance in a later commit.
      Patrick Steinhardt committed
  15. 07 Jul, 2018 3 commits
  16. 22 Jun, 2018 1 commit
  17. 10 Jun, 2018 1 commit
  18. 09 May, 2018 1 commit
    • cmake: remove now-useless LIBGIT2_LIBDIRS handling · 8ab470f5
      With the recent change of always resolving pkg-config libraries to their
      full path, we do not have to manage the LIBGIT2_LIBDIRS variable
      anymore. The only other remaining user of LIBGIT2_LIBDIRS is winhttp,
      which is a CMake-style library target and can thus be resolved by CMake
      automatically.
      
      Remove the variable to simplify our build system a bit.
      Patrick Steinhardt committed