• Show log

    Commit

  • Hash : bfa1f022
    Author : Edward Thomson
    Date : 2018-06-22T19:17:08

    settings: optional unsaved index safety
    
    Add the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option, which will cause
    commands that reload the on-disk index to fail if the current
    `git_index` has changed that have not been saved.  This will prevent
    users from - for example - adding a file to the index then calling a
    function like `git_checkout` and having that file be silently removed
    from the index since it was re-read from disk.
    
    Now calls that would re-read the index will fail if the index is
    "dirty", meaning changes have been made to it but have not been written.
    Users can either `git_index_read` to discard those changes explicitly,
    or `git_index_write` to write them.
    

  • 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.