1. 26 Mar, 2020 4 commits
  2. 01 Dec, 2018 1 commit
  3. 28 Nov, 2018 1 commit
    • tests: move apply_helpers functions into own compilation unit · 14a9a4f3
      Currently, the "apply_helper" functions used for testing the apply logic are all
      statically defined in the "apply_helpers.h" header file. This may lead to
      warnings from the compiler in case where this header file is included, but not
      all functions it brings along are used in the compilation unit where it has been
      included into.
      
      Fix these potential warnings by moving the implementation into its own
      compilation unit "apply_helpers.c".
      Patrick Steinhardt committed
  4. 13 Nov, 2018 3 commits
    • tests: address two null argument instances · f127ce35
      Handle two null argument cases that occur in the unit tests.
      One is in library code, the other is in test code.
      
      Detected by running unit tests with undefined behavior sanitizer:
      ```bash
       # build
      mkdir build && cd build
      cmake -DBUILD_CLAR=ON -DCMAKE_C_FLAGS="-fsanitize=address \
      -fsanitize=undefined -fstack-usage -static-libasan" ..
      cmake --build .
      
       # run with asan
      ASAN_OPTIONS="allocator_may_return_null=1" ./libgit2_clar
      ...
      ............../libgit2/src/apply.c:316:3: runtime error: null pointer \
      passed as argument 1, which is declared to never be null
      ...................../libgit2/tests/apply/fromfile.c:46:3: runtime \
      error: null pointer passed as argument 1, which is declared to never be null
      ```
      Noah Pendleton committed
    • tests: apply: fix reference to deprecated `git_buf_free` · afc64bcd
      Since commit 56ffdfc6 (buffer: deprecate `git_buf_free` in favor of
      `git_buf_dispose`, 2018-02-08), the function `git_buf_free` is
      deprecated and shall not be used anymore. As part of the new apply
      framework that has been cooking for quite some time some new references
      have been introduced to that deprecated function. Replace them with
      calls to `git_buf_dispose`.
      Patrick Steinhardt committed
    • tests: apply: fix missing `cl_git_pass` wrappers · fe215153
      Some function calls in the new "apply" test suite were missing the
      checks whether they succeeded as expected. Fix this by adding the
      missing `cl_git_pass` wrappers.
      Patrick Steinhardt committed
  5. 05 Nov, 2018 29 commits
  6. 04 Nov, 2018 2 commits