1. 01 Aug, 2019 1 commit
    • Adjust printf specifiers in examples code · 73a186f2
      Static analysis of example code found multiple findings of `printf` usage
      where filling value is members of git_indexer_progress object. Specifier
      used was for signed int but git_indexer_progress members are typed as
      unsigned ints. `printf` specifiers were altered to match type.
      Scott Furry committed
  2. 24 Jul, 2019 1 commit
  3. 20 Jul, 2019 1 commit
  4. 11 Jul, 2019 1 commit
  5. 05 Jul, 2019 6 commits
  6. 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
  7. 25 Jun, 2019 4 commits
  8. 15 Jun, 2019 1 commit
  9. 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
  10. 16 Apr, 2019 6 commits
  11. 22 Feb, 2019 1 commit
  12. 15 Feb, 2019 6 commits
  13. 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
  14. 25 Jan, 2019 1 commit
  15. 22 Jan, 2019 1 commit
  16. 17 Jan, 2019 2 commits
  17. 17 Jul, 2018 1 commit
  18. 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
  19. 07 Jul, 2018 1 commit