• Show log

    Commit

  • Hash : 309113c9
    Author : Russell Belfer
    Date : 2011-11-29T23:45:17

    Make initial value of git_buf ptr always be a valid empty string. Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c.

  • README.md

  • Writing Clay tests for libgit2

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

    https://github.com/tanoku/clay

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

    • Mix the tests:

        ./clay -vtap .
    • Make sure you actually build the tests by setting:

        BUILD_CLAY=ON
    • Test:

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

    • Send your pull request. That’s it.