- 09 Feb, 2016 1 commit
-
-
Previously we would set the global filter registry structure before adding filters to the structure, without a lock, which is quite racy. Now, register default filters during global registration and use an rwlock to read and write the filter registry (as appopriate).
Edward Thomson committed
-
- 12 Jul, 2015 1 commit
-
-
When the stream list init or write fail, we must also make sure to close the stream, as that's the function contract.
Carlos Martín Nieto committed
-
- 01 Jul, 2015 1 commit
-
-
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 committed
-
- 10 Jun, 2015 2 commits
-
-
`git_filter_list_contains` can be used to query a filter list to determine if a given filter will be run.
Edward Thomson committed -
When we hit an error writing to the next stream from a file, we jump to 'done' which currently skips over closing the file descriptor. Make sure to close the descriptor if it has been set to a valid value.
Carlos Martín Nieto committed
-
- 11 May, 2015 1 commit
-
-
J Wyman committed
-
- 07 May, 2015 1 commit
-
-
64K is optimal buffer size per https://technet.microsoft.com/en-us/library/cc938632.aspx
J Wyman committed
-
- 28 Apr, 2015 1 commit
-
-
In checkout.c and filter.c we were casting a sub struct to a parent struct which breaks the strict aliasing rules in C. However we can use .parent or .base to access the parent struct to avoid the build warnings. In remote.c the local variable error was not initialized or updated in some cases. For unintialized error a build warning will be generated. So always keep error variable up-to-date.
Leo Yang committed
-
- 25 Mar, 2015 1 commit
-
-
If we are using a temporary buffer for filtering, be sure to clear it before using it, in case the file that we are filtering is empty.
Edward Thomson committed
-
- 06 Mar, 2015 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 19 Feb, 2015 4 commits
-
-
Edward Thomson committed
-
Refactor `git_filter_list__load_with_attr_reader` into `git_filter_list__load_ext`, which takes a `git_filter_options`.
Edward Thomson committed -
For consistency with the rest of the library, where an opt is an options *structure*.
Edward Thomson committed -
Provide a convenience function that creates a buffer that can be provided to callers but will not be freed via `git_buf_free`, so the buffer creator maintains the allocation lifecycle of the buffer's contents.
Edward Thomson committed
-
- 18 Feb, 2015 2 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
- 17 Feb, 2015 4 commits
-
-
Let the filters use the checkout data's temporary buffer, instead of having to allocate new buffers each time.
Edward Thomson committed -
Use the new streaming filter API during checkout.
Edward Thomson committed -
Migrate the `git_filter_list_apply_*` functions over to using the new filter streams.
Edward Thomson committed -
Add structures and preliminary functions to take a buffer, file or blob and write the contents in chunks through an arbitrary number of chained filters, finally writing into a user-provided function accept the contents.
Edward Thomson committed
-
- 13 Feb, 2015 2 commits
-
-
Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
Edward Thomson committed -
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Edward Thomson committed
-
- 03 Feb, 2015 1 commit
-
-
During checkout, assume that the .gitattributes files aren't modified during the checkout. Instead, create an "attribute session" during checkout. Assume that attribute data read in the same checkout "session" hasn't been modified since the checkout started. (But allow subsequent checkouts to invalidate the cache.) Further, cache nonexistent git_attr_file data even when .gitattributes files are not found to prevent re-scanning for nonexistent files.
Edward Thomson committed
-
- 09 Oct, 2014 1 commit
-
-
Anurag Gupta (OSG) committed
-
- 08 May, 2014 2 commits
-
-
Russell Belfer committed
-
This adds in missing calls to `git_buf_sanitize` and fixes a number of places where `git_buf` APIs could inadvertently write NUL terminator bytes into invalid buffers. This also changes the behavior of `git_buf_sanitize` to NUL terminate a buffer if it can and of `git_buf_shorten` to do nothing if it can. Adds tests of filtering code with zeroed (i.e. unsanitized) buffer which was previously triggering a segfault.
Russell Belfer committed
-
- 06 May, 2014 1 commit
-
-
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
-
- 25 Apr, 2014 1 commit
-
-
Jiri Pospisil committed
-
- 12 Dec, 2013 1 commit
-
-
This renames git_vector_free_all to the better git_vector_free_deep and also contains a couple of memory leak fixes based on valgrind checks. The fixes are specifically: failure to free global dir path variables when not compiled with threading on and failure to free filters from the filter registry that had not be initialized fully.
Russell Belfer committed
-
- 24 Sep, 2013 1 commit
-
-
Russell Belfer committed
-
- 17 Sep, 2013 9 commits
-
-
This contains a few bug fixes and some header and API cleanups. The main API change is that filters should now use GIT_PASSTHROUGH to indicate that they wish to skip processing a file instead of GIT_ENOTFOUND. The bug fixes include a possible out-of-range buffer access in the ident filter, a filter ordering problem I introduced into the custom filter tests on Windows, and a filter buf NUL termination issue that was coming up on Linux.
Russell Belfer committed -
Fixed the filter order to match core Git, too. This test demonstrates an interesting behavior of core Git (which is totally reasonable and which libgit2 matches, although mostly by coincidence). If you use the ident filter and commit a file with a garbage ident in it, like '$Id: this is just garbage$' and then immediately do a 'git checkout-index' with the new file, Git will not consider the file out of date and will not overwrite the file with an updated $Id$. Libgit2 has the same behavior. If you remove the file and then do a checkout-index, it will be replaced with a filtered version that has injected the OID correctly.
Russell Belfer committed -
I wish MSVC understood that "const char **" is not a const ptr, but it a non-const pointer to an array of const ptrs. Does that seem like too much to ask.
Russell Belfer committed -
This ports over some of the tests from https://github.com/libgit2/libgit2/pull/1683 by @yorah and @ethomson
Russell Belfer committed -
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 -
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 the git2/sys/filter API with functions to look up a filter and add it manually to a filter list. This requires some trickery because the regular attribute lookups and checks are bypassed when this happens, but in the right hands, it will allow a user to have granular control over applying filters.
Russell Belfer committed -
This updates the git filter registry to be a little cleaner and plugs some memory leaks.
Russell Belfer committed -
I knew I forgot something
Russell Belfer committed
-