tests/filter


Log

Author Commit Date CI Message
Edward Thomson 1439b9ff 2021-07-22T15:29:54 filter: introduce GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT Provide a mechanism to filter using attribute data from a specific commit (making use of `GIT_ATTR_CHECK_INCLUDE_COMMIT`).
Edward Thomson ff78aea6 2021-05-11T11:09:31 Merge pull request #5860 from libgit2/ethomson/buf_text buf: remove unnecessary buf_text namespace
Edward Thomson d525e063 2021-05-10T23:04:59 buf: remove internal `git_buf_text` namespace The `git_buf_text` namespace is unnecessary and strange. Remove it, just keep the functions prefixed with `git_buf`.
Edward Thomson 68b9605a 2021-05-06T15:37:31 filter: deprecate git_filter_list_apply_to_data Deprecate `git_filter_list_apply_to_data` as it takes user input as a `git_buf`. Users should use `git_filter_list_apply_to_buffer` instead.
Edward Thomson 855f2998 2021-01-05T14:45:14 blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD` `GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not for the MacBook Pro keyboard and my inattentiveness.
Edward Thomson cdbbb364 2019-07-21T16:25:41 filter: test second-level in-repo `.gitattributes` Ensure that a `.gitattributes` file that is deeper in the tree is honored, not just an attributes file at the root.
Edward Thomson 3661e35e 2019-06-23T23:52:24 filter: test we can filter a blob in a bare repo
Edward Thomson e7fc8601 2019-07-21T11:53:29 filter: test that system attributes can be ignored Test that we can optionally ignore system attributes when filtering a blob.
Edward Thomson c66f7605 2019-07-21T11:44:11 filter: ensure system attributes are read By default, `/etc/gitattributes` (or the system equivalent) is read to provide attributes. Ensure that, by default, this is read when filtering blobs.
Edward Thomson a008ceea 2019-07-21T11:01:36 blob: convert users of git_blob_filtered_content Move users of `git_blob_filtered_content` to `git_blob_filter`.
Edward Thomson c0290e27 2019-06-23T23:52:52 filter: add a crlf blob test Add a LF->CRLF conversion test to the blob filter.
Edward Thomson 08f39208 2019-06-08T17:46:04 blob: add underscore to `from` functions The majority of functions are named `from_something` (with an underscore) instead of `fromsomething`. Update the blob functions for consistency with the rest of the library.
Edward Thomson f673e232 2018-12-27T13:47:34 git_error: use new names in internal APIs and usage Move to the `git_error` name in the internal API for error-related functions.
Sven Strickroth 2a9b0102 2015-01-23T14:16:34 Additional core.autocrlf and core.safecrlf tests This is a cherry-pick of the tests from the following commits: core.autocrlf=true and core.safecrlf=true did not fail on LF-only file as vanilla git does Adding a CRLF-file with core.autocrlf=input and core.safecrlf=true does not fail as with vanilla git Make files with #CR!=#CRLF not fail with core.safecrlf=true Reported-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw> Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson 168fe39b 2018-11-28T14:26:57 object_type: use new enumeration names Use the new object_type enumeration names within the codebase.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Patrick Steinhardt cf07db2f 2017-04-07T16:05:10 filter: only close filter if it's been initialized correctly In the function `git_filter_list_stream_data`, we initialize, write and subesquently close the stream which should receive content processed by the filter. While we skip writing to the stream if its initialization failed, we still try to close it unconditionally -- even if the initialization failed, where the stream might not be set at all, leading us to segfault. Semantics in this code is not really clear. The function handling the same logic for files instead of data seems to do the right thing here in only closing the stream when initialization succeeded. When stepping back a bit, this is only reasonable: if a stream cannot be initialized, the caller would not expect it to be closed again. So actually, both callers of `stream_list_init` fail to do so. The data streaming function will always close the stream and the file streaming function will not close the stream if writing to it has failed. The fix is thus two-fold: - callers of `stream_list_init` now close the stream iff it has been initialized - `stream_list_init` now closes the lastly initialized stream if the current stream in the chain failed to initialize Add a test which segfaulted previous to these changes.
Edward Thomson 9a99ca7b 2015-07-10T09:25:45 wildcard filters: move CHANGELOG message to 0.23+1
Edward Thomson bae467ae 2015-07-10T09:25:20 wildcard filters: clean up some warnings in tests
Carlos Martín Nieto 9847d80d 2015-07-09T18:21:31 Merge pull request #3281 from ethomson/wildcard_filters filters: custom filters with wildcard attributes
Carlos Martín Nieto ea445e06 2015-07-07T00:48:17 Merge pull request #3288 from ethomson/getenv git__getenv: utf-8 aware env reader
Edward Thomson e069c621 2015-07-02T09:25:48 git__getenv: utf-8 aware env reader Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere. Make `cl_getenv` use this to keep consistent memory handling around return values (free everywhere, as opposed to only some platforms).
Edward Thomson 79306d8d 2015-07-02T10:18:40 filter::stream: free the filter sanely Don't use the filter's free callback to free the actual data structure holding the filter, as we may not always actually initialize it (the test may be skipped).
Edward Thomson 63924435 2015-07-01T09:40:11 filters: custom filters with wildcard attributes Allow custom filters with wildcard attributes, so that clients can support some random `filter=foo` in a .gitattributes and look up the corresponding smudge/clean commands in the configuration file.
Edward Thomson d88abb89 2015-06-29T21:54:06 filter test: pass base type
Edward Thomson 1e46d545 2015-06-09T03:50:00 crlf tests: ensure that Unix obeys autocrlf=true All platforms do terrible, horrible, no good, very bad translation when core.autocrlf=true. It's not just Windows!
Edward Thomson 2eecc288 2015-06-10T14:43:49 Introduce `git_filter_list_contains` `git_filter_list_contains` can be used to query a filter list to determine if a given filter will be run.
Colomban Wendling 1ecbcd8e 2015-05-26T19:16:27 Fix ident replacement to match Git behavior Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the same.
Edward Thomson 78db0239 2015-03-24T20:58:00 squash some leaks
Edward Thomson 0b3dd8fb 2015-03-06T15:16:05 filter::file tests: test filter_list_apply_to_file Test that filter_list_apply_to_file works and can accept repo-relative paths.
Edward Thomson feb0e022 2015-02-19T12:14:06 tests: separate INVASIVE filesystem tests Introduce GITTEST_INVASIVE_FS_STRUCTURE for things that are invasive to your filesystem structure (like creating folders at your filesystem root) and GITTEST_INVASIVE_FS_SIZE for things that write lots of data.
Edward Thomson 795eaccd 2015-02-19T11:09:54 git_filter_opt_t -> git_filter_flag_t For consistency with the rest of the library, where an opt is an options *structure*.
Edward Thomson f7c0125f 2015-02-18T09:28:07 filter streams: base -> parent
Edward Thomson b75f15aa 2015-02-18T09:25:32 git_writestream: from git_filter_stream
Edward Thomson 8c2dfb38 2015-02-17T13:27:06 filter: test a large file through the stream Test pushing a file on-disk into a streaming filter that compresses it into the ODB, and inflates it back into the working directory.
Linquize b4c6a9da 2014-10-26T05:45:23 Add files and tests with many UTF-8 chars and few UTF-8 chars
Edward Thomson 49837fd4 2014-05-30T11:30:53 Ignore core.safecrlf=warn until we have a warn infrastructure
Russell Belfer 16798d08 2014-05-19T14:57:09 Make core.safecrlf work on LF-ending platforms If you enabled core.safecrlf on an LF-ending platform, we would error even for files with all LFs. We should only be warning on irreversible mappings, I think.
Russell Belfer 5269008c 2014-05-06T16:01:49 Add filter options and ALLOW_UNSAFE 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.
Edward Thomson 855c66de 2014-03-27T16:34:20 Introduce core.safecrlf handling
Edward Thomson 2a528bc0 2014-02-11T19:05:13 Fix filter test for CRLF->LF issues
Carlos Martín Nieto d541170c 2014-01-24T11:36:41 index: rename an entry's id to 'id' This was not converted when we converted the rest, so do it now.
Edward Thomson 6adcaab7 2014-01-08T10:07:30 Handle git_buf's from users more liberally
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests