1. 09 Oct, 2014 1 commit
  2. 08 May, 2014 2 commits
  3. 06 May, 2014 1 commit
    • Add filter options and ALLOW_UNSAFE · 5269008c
      Diff and status do not want core.safecrlf to actually raise an
      error regardless of the setting, so this extends the filter API
      with an additional options flags parameter and adds a flag so that
      filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating
      that unsafe filter application should be downgraded from a failure
      to a warning.
      Russell Belfer committed
  4. 25 Apr, 2014 1 commit
  5. 12 Dec, 2013 1 commit
    • Cleanups, renames, and leak fixes · 9cfce273
      This renames git_vector_free_all to the better git_vector_free_deep
      and also contains a couple of memory leak fixes based on valgrind
      checks.  The fixes are specifically: failure to free global dir
      path variables when not compiled with threading on and failure to
      free filters from the filter registry that had not be initialized
      fully.
      Russell Belfer committed
  6. 24 Sep, 2013 1 commit
  7. 17 Sep, 2013 13 commits
    • Bug fixes and cleanups · eefc32d5
      This contains a few bug fixes and some header and API cleanups.
      
      The main API change is that filters should now use GIT_PASSTHROUGH
      to indicate that they wish to skip processing a file instead of
      GIT_ENOTFOUND.
      
      The bug fixes include a possible out-of-range buffer access in
      the ident filter, a filter ordering problem I introduced into the
      custom filter tests on Windows, and a filter buf NUL termination
      issue that was coming up on Linux.
      Russell Belfer committed
    • Some tests with ident and crlf filters · 37f9e409
      Fixed the filter order to match core Git, too.
      
      This test demonstrates an interesting behavior of core Git (which
      is totally reasonable and which libgit2 matches, although mostly
      by coincidence).  If you use the ident filter and commit a file
      with a garbage ident in it, like '$Id: this is just garbage$' and
      then immediately do a 'git checkout-index' with the new file, Git
      will not consider the file out of date and will not overwrite the
      file with an updated $Id$.  Libgit2 has the same behavior.  If you
      remove the file and then do a checkout-index, it will be replaced
      with a filtered version that has injected the OID correctly.
      Russell Belfer committed
    • Fix win32 warnings · e399c7ee
      I wish MSVC understood that "const char **" is not a const ptr,
      but it a non-const pointer to an array of const ptrs.  Does that
      seem like too much to ask.
      Russell Belfer committed
    • Port tests from PR 1683 · b47349b8
      This ports over some of the tests from
          https://github.com/libgit2/libgit2/pull/1683
      by @yorah and @ethomson
      Russell Belfer committed
    • Merge git_buf and git_buffer · a9f51e43
      This makes the git_buf struct that was used internally into an
      externally available structure and eliminates the git_buffer.
      
      As part of that, some of the special cases that arose with the
      externally used git_buffer were blended into the git_buf, such as
      being careful about git_buf objects that may have a NULL ptr and
      allowing for bufs with a valid ptr and size but zero asize as a
      way of referring to externally owned data.
      Russell Belfer committed
    • Add ident filter · 4b11f25a
      This adds the ident filter (that knows how to replace $Id$) and
      tweaks the filter APIs and code so that git_filter_source objects
      actually have the updated OID of the object being filtered when
      it is a known value.
      Russell Belfer committed
    • Add functions to manipulate filter lists · 40cb40fa
      Extend the git2/sys/filter API with functions to look up a filter
      and add it manually to a filter list.  This requires some trickery
      because the regular attribute lookups and checks are bypassed when
      this happens, but in the right hands, it will allow a user to have
      granular control over applying filters.
      Russell Belfer committed
    • Update filter registry code · 0646634e
      This updates the git filter registry to be a little cleaner and
      plugs some memory leaks.
      Russell Belfer committed
    • Hook up filter initialize callback · 29e92d38
      I knew I forgot something
      Russell Belfer committed
    • Extend public filter api with filter lists · 2a7d224f
      This moves the git_filter_list into the public API so that users
      can create, apply, and dispose of filter lists.  This allows more
      granular application of filters to user data outside of libgit2
      internals.
      
      This also converts all the internal usage of filters to the public
      APIs along with a few small tweaks to make it easier to use the
      public git_buffer stuff alongside the internal git_buf.
      Russell Belfer committed
    • Add attributes to filters and fix registry · 974774c7
      The filter registry as implemented was too primitive to actually
      work once multiple filters were coming into play.  This expands
      the implementation of the registry to handle multiple prioritized
      filters correctly.
      
      Additionally, this adds an "attributes" field to a filter that
      makes it really really easy to implement filters that are based
      on one or more attribute values.  The lookup and even simple value
      checking can all happen automatically without custom filter code.
      
      Lastly, with the registry improvements, this fills out the filter
      lifecycle callbacks, with initialize and shutdown callbacks that
      will be called before the filter is first used and after it is
      last invoked.  This allows for system-wide initialization and
      cleanup by the filter.
      Russell Belfer committed
    • Create public filter object and use it · 85d54812
      This creates include/sys/filter.h with a basic definition of a
      git_filter and then converts the internal code to use it.  There
      are related internal objects (git_filter_list) that we will want
      to publish at some point, but this is a first step.
      Russell Belfer committed
  8. 17 Mar, 2013 1 commit
  9. 08 Jan, 2013 1 commit
  10. 28 Nov, 2012 1 commit
    • Consolidate text buffer functions · 7bf87ab6
      There are many scattered functions that look into the contents of
      buffers to do various text manipulations (such as escaping or
      unescaping data, calculating text stats, guessing if content is
      binary, etc).  This groups all those functions together into a
      new file and converts the code to use that.
      
      This has two enhancements to existing functionality.  The old
      text stats function is significantly rewritten and the BOM
      detection code was extended (although largely we can't deal with
      anything other than a UTF8 BOM).
      Russell Belfer committed
  11. 01 Nov, 2012 1 commit
  12. 17 Sep, 2012 2 commits
  13. 22 Jul, 2012 1 commit
  14. 16 Jul, 2012 1 commit
  15. 10 Jul, 2012 1 commit
  16. 17 May, 2012 1 commit
  17. 03 May, 2012 1 commit
  18. 30 Apr, 2012 1 commit
  19. 26 Apr, 2012 1 commit
  20. 25 Apr, 2012 1 commit
    • Implement git_pool paged memory allocator · 2bc8fa02
      This adds a `git_pool` object that can do simple paged memory
      allocation with free for the entire pool at once.  Using this,
      you can replace many small allocations with large blocks that
      can then cheaply be doled out in small pieces.  This is best
      used when you plan to free the small blocks all at once - for
      example, if they represent the parsed state from a file or data
      stream that are either all kept or all discarded.
      
      There are two real patterns of usage for `git_pools`: either
      for "string" allocation, where the item size is a single byte
      and you end up just packing the allocations in together, or for
      "fixed size" allocation where you are allocating a large object
      (e.g. a `git_oid`) and you generally just allocation single
      objects that can be tightly packed.  Of course, you can use it
      for other things, but those two cases are the easiest.
      Russell Belfer committed
  21. 02 Mar, 2012 2 commits
  22. 01 Mar, 2012 3 commits
  23. 29 Feb, 2012 1 commit