• Show log

    Commit

  • Hash : cd460522
    Author : Tony De La Nuez
    Date : 2020-04-20T22:16:52

    odb: Implement option for overriding of default odb backend priority
    
    Introduce GIT_OPT_SET_ODB_LOOSE_PRIORITY and GIT_OPT_SET_ODB_PACKED_PRIORITY
    to allow overriding the default priority values for the default ODB
    backends. Libgit2 has historically assumed that most objects for long-
    running operations will be packed, therefore GIT_LOOSE_PRIORITY is
    set to 1 by default, and GIT_PACKED_PRIORITY to 2.
    When a client allows libgit2 to set the default backends, they can
    specify an override for the two priority values in order to change
    the order in which each ODB backend is accessed.
    

  • README.md

  • Writing Clar tests for libgit2

    For information on the Clar testing framework and a detailed introduction please visit:

    https://github.com/vmg/clar

    • Write your modules and tests. Use good, meaningful names.

    • Make sure you actually build the tests by setting:

        cmake -DBUILD_CLAR=ON build/
    • Test:

        ./build/libgit2_clar
    • Make sure everything is fine.

    • Send your pull request. That’s it.

    Memory leak checks

    These are automatically run as part of CI, but if you want to check locally:

    Linux

    Uses valgrind:

    $ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
    $ cmake --build .
    $ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
      ./libgit2_clar

    macOS

    Uses leaks, which requires XCode installed:

    $ MallocStackLogging=1 MallocScribble=1 MallocLogFile=/dev/null CLAR_AT_EXIT="leaks -quiet \$PPID" \
      ./libgit2_clar