summaryrefslogtreecommitdiff
path: root/src/crlf.c
Commit message (Collapse)AuthorAgeFilesLines
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-1/+1
|
* errors: Rename the generic return codesVicent Martí2012-05-181-3/+3
|
* global: Change parameter ordering in APIVicent Martí2012-05-181-3/+3
| | | | Consistency is good.
* Support reading attributes from indexRussell Belfer2012-05-031-1/+2
| | | | | | | | | | | | | | Depending on the operation, we need to consider gitattributes in both the work dir and the index. This adds a parameter to all of the gitattributes related functions that allows user control of attribute reading behavior (i.e. prefer workdir, prefer index, only use index). This fix also covers allowing us to check attributes (and hence do diff and status) on bare repositories. This was a somewhat larger change that I hoped because it had to change the cache key used for gitattributes files.
* Remove old and unused error codesVicent Martí2012-05-021-2/+1
|
* buf: deploy git_buf_len()nulltoken2012-04-301-2/+2
|
* error-handling: RepositoryVicent Martí2012-03-071-2/+1
| | | | | | | | This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
* Add filter tests and fix some bugsRussell Belfer2012-03-021-40/+20
| | | | | This adds some initial unit tests for file filtering and fixes some simple bugs in filter application.
* config: Implement a proper cvar cacheVicent Martí2012-03-021-2/+10
|
* attr: Change the attribute check macrosVicent Martí2012-03-021-4/+4
| | | | | | | | | | | | | | | | | | | | | The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be able to change the way that true and false values are stored inside of the returned gitattributes value pointer. However, if these macros are implemented as a simple rename for the `git_attr__true` pointer, they will always be used with the `==` operator, and hence we cannot really change the implementation to any other way that doesn't imply using special pointer values and comparing them! We need to do the same thing that core Git does, which is using a function macro. With `GIT_ATTR_TRUE(attr)`, we can change internally the way that these values are stored to anything we want. This commit does that, and rewrites a large chunk of the attributes test suite to remove duplicated code for expected attributes, and to properly test the function macro behavior instead of comparing pointers.
* filter: Beautiful refactoringVicent Martí2012-03-011-34/+82
| | | | Comments soothe my soul.
* filter: Add write-to CRLF filterVicent Martí2012-02-291-0/+193