summaryrefslogtreecommitdiff
path: root/src/filter.h
Commit message (Collapse)AuthorAgeFilesLines
* Increase binary detection len to 8kRussell Belfer2014-05-161-0/+4
|
* Add ident filterRussell Belfer2013-09-171-0/+3
| | | | | | | 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.
* Extend public filter api with filter listsRussell Belfer2013-09-171-60/+0
| | | | | | | | | | | 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.
* Create public filter object and use itRussell Belfer2013-09-171-32/+29
| | | | | | | 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.
* Start of filter API + git_blob_filtered_contentRussell Belfer2013-09-171-11/+8
| | | | | | | | | | 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
* Move crlf conversion into buf_textautocrlf-fixesRussell Belfer2013-03-251-1/+0
| | | | | | | | | | | | | | 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.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Consolidate text buffer functionsRussell Belfer2012-11-281-28/+1
| | | | | | | | | | | | | 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).
* checkout : reduce memory usage when not filteringnulltoken2012-09-171-11/+0
|
* checkout: introduce git_checkout_tree()nulltoken2012-09-171-4/+3
|
* Migrate code to git_filter_blob_contents.Ben Straub2012-07-161-0/+12
| | | | | | Also removes the unnecessary check for filter length, since git_filters_apply does the right thing when there are none, and it's more efficient than this.
* Checkout: add structure for CRLF.Ben Straub2012-07-091-0/+3
|
* errors: Rename the generic return codesVicent Martí2012-05-181-1/+1
|
* config: Implement a proper cvar cacheVicent Martí2012-03-021-21/+0
|
* filter: Beautiful refactoringVicent Martí2012-03-011-11/+73
| | | | Comments soothe my soul.
* filter: Precache the filter config options on loadVicent Martí2012-03-011-2/+5
|
* filter: Add write-to CRLF filterVicent Martí2012-02-291-11/+10
|
* filter: Load attributes for fileVicent Martí2012-02-281-0/+36
|
* filter: Apply filters before writing a file to the ODBVicent Martí2012-02-271-0/+40
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.