1. 25 Mar, 2013 1 commit
    • 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
  2. 08 Jan, 2013 1 commit
  3. 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
  4. 17 Sep, 2012 2 commits
  5. 16 Jul, 2012 1 commit
  6. 10 Jul, 2012 1 commit
  7. 17 May, 2012 1 commit
  8. 02 Mar, 2012 1 commit
  9. 01 Mar, 2012 2 commits
  10. 29 Feb, 2012 1 commit
  11. 28 Feb, 2012 1 commit
  12. 27 Feb, 2012 1 commit
    • filter: Apply filters before writing a file to the ODB · 44b1ff4c
      Initial implementation. The relevant code is in `blob.c`: the blob write
      function has been split into smaller functions.
      
      	- Directly write a file to the ODB in streaming mode
      
      	- Directly write a symlink to the ODB in direct mode
      
      	- Apply a filter, and write a file to the ODB in direct mode
      
      When trying to write a file, we first call `git_filter__load_for_file`,
      which populates a filters array with the required filters based on the
      filename.
      
      If no filters are resolved to the filename, we can write to the ODB in
      streaming mode straight from disk. Otherwise, we load the whole file in
      memory and use double-buffering to apply the filter chain. We finish
      by writing the file as a whole to the ODB.
      Vicent Martí committed