1. 16 May, 2014 1 commit
  2. 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
  3. 03 Apr, 2014 1 commit
  4. 30 Jan, 2014 1 commit
  5. 08 Jan, 2014 1 commit
  6. 11 Dec, 2013 1 commit
  7. 05 Nov, 2013 1 commit
  8. 17 Sep, 2013 5 commits
    • 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
    • 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
    • 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
    • Start of filter API + git_blob_filtered_content · 0cf77103
      This begins the process of exposing git_filter objects to the
      public API.  This includes:
      
      * new public type and API for `git_buffer` through which an
        allocated buffer can be passed to the user
      * new API `git_blob_filtered_content`
      * make the git_filter type and GIT_FILTER_TO_... constants public
      Russell Belfer committed
  9. 15 Aug, 2013 1 commit
  10. 26 Jul, 2013 1 commit
  11. 25 Jul, 2013 1 commit
    • Fix rename detection to use actual blob size · a16e4172
      The size data in the index may not reflect the actual size of the
      blob data from the ODB when content filtering comes into play.
      This commit fixes rename detection to use the actual blob size when
      calculating data signatures instead of the value from the index.
      
      Because of a misunderstanding on my part, I first converted the
      git_index_add_bypath API to use the post-filtered blob data size
      in creating the index entry.  I backed that change out, but I
      kept the overall refactoring of that routine and the new internal
      git_blob__create_from_paths API because it eliminates an extra
      stat() call from the code that adds a file to the index.
      
      The existing tests actually cover this code path, at least when
      running on Windows, so at this point I'm not adding new tests to
      cover the changes.
      Russell Belfer committed
  12. 10 Jun, 2013 1 commit
    • Reorganize diff and add basic diff driver · 114f5a6c
      This is a significant reorganization of the diff code to break it
      into a set of more clearly distinct files and to document the new
      organization.  Hopefully this will make the diff code easier to
      understand and to extend.
      
      This adds a new `git_diff_driver` object that looks of diff driver
      information from the attributes and the config so that things like
      function content in diff headers can be provided.  The full driver
      spec is not implemented in the commit - this is focused on the
      reorganization of the code and putting the driver hooks in place.
      
      This also removes a few #includes from src/repository.h that were
      overbroad, but as a result required extra #includes in a variety
      of places since including src/repository.h no longer results in
      pulling in the whole world.
      Russell Belfer committed
  13. 30 Apr, 2013 2 commits
  14. 29 Apr, 2013 1 commit
  15. 22 Apr, 2013 4 commits
  16. 21 Apr, 2013 1 commit
    • Move odb_backend implementors stuff into git2/sys · 83cc70d9
      This moves some of the odb_backend stuff that is related to the
      internals of an odb_backend implementation into include/git2/sys.
      
      Some of the stuff related to streaming I left in include/git2
      because it seemed like it would be reasonably needed by a normal
      user who wanted to stream objects into and out of the ODB.
      
      Also, I added APIs for traversing the list of backends so that
      some of the tests would not need to access ODB internals.
      Russell Belfer committed
  17. 25 Mar, 2013 2 commits
    • Move crlf conversion into buf_text · 3658e81e
      This adds crlf/lf conversion functions into buf_text with more
      efficient implementations that bypass the high level buffer
      functions.  They attempt to minimize the number of reallocations
      done and they directly write the buffer data as needed if they
      know that there is enough memory allocated to memcpy data.
      
      Tests are added for these new functions.  The crlf.c code is
      updated to use the new functions.
      
      Removed the include of buf_text.h from filter.h and just include
      it more narrowly in the places that need it.
      Russell Belfer committed
    • Add has_cr_in_index check to CRLF filter · 9733e80c
      This adds a check to the drop_crlf filter path to check it the
      file in the index already has a CR in it, in which case this will
      not drop the CRs from the workdir file contents.
      
      This uncovered a "bug" in `git_blob_create_fromworkdir` where the
      full path to the file was passed to look up the attributes instead
      of the relative path from the working directory root.  This meant
      that the check in the index for a pre-existing entry of the same
      name was failing.
      Russell Belfer committed
  18. 08 Jan, 2013 1 commit
  19. 07 Jan, 2013 1 commit
  20. 17 Dec, 2012 1 commit
  21. 27 Nov, 2012 1 commit
  22. 22 Oct, 2012 1 commit
  23. 13 Sep, 2012 1 commit
  24. 11 Sep, 2012 1 commit
  25. 06 Sep, 2012 1 commit
  26. 07 Jun, 2012 1 commit
  27. 13 May, 2012 1 commit
  28. 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
  29. 16 Mar, 2012 1 commit
  30. 15 Mar, 2012 1 commit
    • Continue error conversion · deafee7b
      This converts blob.c, fileops.c, and all of the win32 files.
      Also, various minor cleanups throughout the code.  Plus, in
      testing the win32 build, I cleaned up a bunch (although not
      all) of the warnings with the 64-bit build.
      Russell Belfer committed
  31. 13 Mar, 2012 1 commit
    • Migrate ODB files to new error handling · e1de726c
      This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to
      the new style of error handling.  Also got the unix and win32
      versions of map.c.  There are some minor changes to other
      files but no others were completely converted.
      
      This also contains an update to filebuf so that a zeroed out
      filebuf will not think that the fd (== 0) is actually open
      (and inadvertently call close() on fd 0 if cleaned up).
      
      Lastly, this was built and tested on win32 and contains a
      bunch of fixes for the win32 build which was pretty broken.
      Russell Belfer committed