1. 03 Jul, 2017 3 commits
    • Add missing license headers · 2480d0eb
      Some implementation files were missing the license headers. This commit
      adds them.
      Patrick Steinhardt committed
    • Fix missing include for header files · 0fb4b351
      Some of our header files are not included at all by any of their
      implementing counter-parts. Including them inside of these files leads
      to some compile errors mostly due to unknown types because of missing
      includes. But there's also one case where a declared function does not
      match the implementation's prototype.
      
      Fix all these errors by fixing up the prototype and adding missing
      includes. This is preparatory work for fixing up missing includes in the
      implementation files.
      Patrick Steinhardt committed
    • zlib: include "git2/types.h" instead of "common.h" · 9b0482e4
      The zlib dependency includes "common.h" inside of the "zconf.h" header
      to make available some type declarations like e.g. git_off_t. Including
      the "common.h" header does pull in quite a lot of other headers though,
      which are not required at all. Instead, we can just include our public
      "git2/types.h" header, which is much more limited in its scope but still
      provides everything required for "zconf.h".
      
      This fix eases the transition later on to use a separate "features.h"
      header instead of defines. As we have to generate the "features.h"
      header, we put it in the build directory and add an include directory.
      As we are splitting out building of dependencies into subdirectories,
      this would mean that the zlib dependency needs to be aware of the parent
      project's build directory, which is unfortunate. By including
      "git2/types.h", we avoid this problem.
      Patrick Steinhardt committed
  2. 30 Jun, 2017 1 commit
    • win32: fix circular include deps with w32_crtdbg · 459fb8fe
      The current order of declarations and includes between "common.h" and
      "w32_crtdbg_stacktrace.h" is rather complicated. Both header files make
      use of things defined in the other one and are thus circularly dependent
      on each other. This makes it currently impossible to compile the
      "w32_crtdbg_stacktrace.c" file when including "common.h" inside of
      "w32_crtdbg_stacktrace.h".
      
      We can disentangle the mess by moving declaration of the inline crtdbg
      functions into the "w32_crtdbg_stacktrace.h" file and adding additional
      includes inside of it, such that all required functions are available to
      it. This allows us to break the dependency cycle.
      Patrick Steinhardt committed
  3. 28 Jun, 2017 3 commits
  4. 27 Jun, 2017 2 commits
  5. 26 Jun, 2017 1 commit
  6. 23 Jun, 2017 7 commits
    • Convert port with htons() in p_getaddrinfo() · ef09eae1
      `sin_port` should be in network byte order.
      Ian Douglas Scott committed
    • tests: refs::crashes: create sandbox for creating symref · b6ed67c2
      The test `refs::crashes::double_free` operates on our in-source
      "testrepo.git" repository without creating a copy first. As the test
      will try to create a new symbolic reference, this will fail when we want
      to do a pure out-of-tree build with a read-only source tree.
      
      Fix the issue by creating a sandbox first.
      Patrick Steinhardt committed
    • tests: index::tests: create sandboxed repo for locking · 6ee7d37a
      The test `index::tests::can_lock_index` operates on the "testrepo.git"
      repository located inside of our source tree. While this is okay for
      tests which do read-only operations on these resouces, this specific
      test tries to lock the index by creating a lock. This will obviously
      fail on out-of-tree builds with read-only source trees.
      
      Fix the issue by creating a sandbox first.
      Patrick Steinhardt committed
    • cmake: generate clar.suite in binary directory · 4305fcca
      Change the output path of generate.py to generate the clar.suite file
      inside of the binary directory. This fixes out of tree builds with
      read-only source trees as we now refrain from writing anything into the
      source tree.
      Patrick Steinhardt committed
    • generate.py: generate clar cache in binary directory · 8d22bcea
      The source directory should usually not be touched when using
      out-of-tree builds. But next to the previously fixed "clar.suite" file, we
      are also writing the ".clarcache" into the project's source tree,
      breaking the builds. Fix this by also honoring the output directory for
      the ".clarcache" file.
      Patrick Steinhardt committed
    • generate.py: enable overriding path of generated clar.suite · 9e240bd2
      The generate.py script will currently always write the generated
      clar.suite file into the scanned directory, breaking out-of-tree builds
      with read-only source directories. Fix this issue by adding another
      option to allow overriding the output path of the generated file.
      Patrick Steinhardt committed
    • generate.py: disallow generating test suites for multiple paths · 0a513a94
      Our generate.py script is used to extract and write test suite
      declarations into the clar.suite file. As is, the script accepts
      multiple directories on the command line and will generate this file for
      each of these directories.
      
      The generate.py script will always write the clar.suite file into the
      directory which is about to be scanned. This actually breaks
      out-of-tree builds with libgit2, as the file will be generated in the
      source tree instead of in the build tree. This is noticed especially in
      the case where the source tree is mounted read-only, rendering us unable
      to build unit tests.
      
      Due to us accepting multiple paths which are to be scanned, it is not
      trivial to fix though. The first solution which comes into mind would be
      to re-create the directory hierarchy at a given output path or use
      unique names for the clar.suite files, but this is rather cumbersome and
      magical. The second and cleaner solution would be to fold all
      directories into a single clar.suite file, but this would probably break
      some use-cases.
      
      Seeing that we do not ever pass multiple directories to generate.py, we
      will now simply retire support for this. This allows us to later on
      introduce an additional option to specify the path where the clar.suite
      file will be generated at, defaulting to "clar.suite" inside of the
      scanned directory.
      Patrick Steinhardt committed
  7. 22 Jun, 2017 1 commit
    • cmake: Permit disabling external http-parser · 845f661d
      When attempting to build libgit2 as an isolated static lib, CMake
      gleefully attempts to use the system http-parser.  This is typically
      seen on Linux systems which install header files with every package,
      such as Gentoo.
      
      Allow developers to forcibly disable using the system http-parser with
      the config switch USE_EXT_HTTP_PARSER.  Defaults to ON to maintain
      previous behavior.
      
      Signed-off-by: Jason Cooper <jason@lakedaemon.net>
      Jason Cooper committed
  8. 21 Jun, 2017 8 commits
  9. 19 Jun, 2017 2 commits
  10. 17 Jun, 2017 1 commit
  11. 14 Jun, 2017 4 commits
  12. 13 Jun, 2017 7 commits