• Show log

    Commit

  • Hash : 5f47cb48
    Author : Patrick Steinhardt
    Date : 2020-03-26T14:16:41

    patch: correctly handle mode changes for renames
    
    When generating a patch for a renamed file whose mode bits have changed
    in addition to the rename, then we currently fail to parse the generated
    patch. Furthermore, when generating a diff we output mode bits after the
    similarity metric, which is different to how upstream git handles it.
    
    Fix both issues by adding another state transition that allows
    similarity indices after mode changes and by printing mode changes
    before the similarity index.
    

  • 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