- 23 Mar, 2016 21 commits
-
-
tree_iterator was only working properly for a pathlist containing file paths. In case of directory paths, it didn't match children which contradicts GIT_DIFF_DISABLE_PATHSPEC_MATCH and is different from index_iterator and fs_iterator. As a consequence head-to-index status reporting for a specific directory did not work properly -- all files have been reported as added. Include additional tests.
Marc Strapetz committed -
Edward Thomson committed
-
`git_iterator_advance_over` is a gnarly bit of code with no actual tests.
Edward Thomson committed -
In the workdir iterator we do some tricky things to step down into directories to look for things that are in our pathlist. Make sure that we don't confuse between folders that we're definitely going to return everything in and folders that we're only stepping down into to keep looking for matches.
Edward Thomson committed -
Ensure that when specifying start/end paths, or pathlists, that we deal correctly with submodules.
Edward Thomson committed -
Expand the workdir tests to validate the paths in case sensitive and insensitive tests.
Edward Thomson committed -
Ensure that we have hit the end of iteration; previously we tested that we saw all the values that we expected to see. We did not then ensure that we were at the end of the iteration (and that there were subsequently values in the iteration that we did *not* expect.)
Edward Thomson committed -
Drop some of the layers of indirection between the workdir and the filesystem iterators. This makes the code a little bit easier to follow, and reduces the number of unnecessary allocations a bit as well. (Prior to this, when we filter entries, we would allocate them, filter them and then free them; now we do the filtering before allocation.) Also, rename `git_iterator_advance_over_with_status` to just `git_iterator_advance_over`. Mostly because it's a fucking long-ass function name otherwise.
Edward Thomson committed -
Edward Thomson committed
-
Do not abort iteration in the middle when encountering an unreadable directory. Instead, skip it, as if it didn't exist.
Edward Thomson committed -
Many code paths in checkout need the final, full on-disk path of the file they're writing. (No surprise). However, they all munge the `data->path` buffer themselves to get there. Provide a nice helper method for them. Plus, drop the use `git_iterator_current_workdir_path` which does the same thing but different. Checkout is the only caller of this silly function, which lets us remove it.
Edward Thomson committed -
Refactored the tree iterator to never recurse; simply process the next entry in order in `advance`. Additionally, reduce the number of allocations and sorting as much as possible to provide a ~30% speedup on case-sensitive iteration. (The gains for case-insensitive iteration are less majestic.)
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
Disambiguate the reset and reset_range functions. Now reset_range with a NULL path will clear the start or end; reset will leave the existing start and end unchanged.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
CMakeLists: Show the pointer size for an unsupported architecture
Edward Thomson committed -
Showing the pointer size gives a hint as to why we think this is an unsupported architecture.
Sebastian Schuberth committed -
When the array is empty `cmp` never gets set by the comparison function. Initialize it so we return ENOTFOUND in those cases.
Carlos Martín Nieto committed -
tree: drop the now-unnecessary entries vector
Carlos Martín Nieto committed
-
- 22 Mar, 2016 10 commits
-
-
Add ability to write a filtered blob through a stream
Carlos Martín Nieto committed -
The callback mechanism makes it awkward to write data from an IO source; move to `_fromstream()` which lets the caller remain in control, in the same vein as we prefer iterators over foreach callbacks.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
By returning when the count goes to zero rather than below it, setting `howmany` to 7 in fact writes out the string 6 times. Correct the termination condition to write out the string the amount of times we specify.
Carlos Martín Nieto committed -
The pair of `git_blob_create_frombuffer()` and `git_blob_create_frombuffer_commit()` is meant to replace `git_blob_create_fromchunks()` by providing a way for a user to write a new blob when they want filtering or they do not know the size. This approach allows the caller to retain control over when to add data to this buffer and a more natural fit into higher-level language's own stream abstractions instead of having to handle IO wait in the callback. The in-memory buffer size of 2MB is chosen somewhat arbitrarily to be a round multiple of usual page sizes and a value where most blobs seem likely to be either going to be way below or way over that size. It's also a round number of pages. This implementation re-uses the helper we have from `_fromchunks()` so we end up writing everything to disk, but hopefully more efficiently than with a default filebuf. A later optimisation can be to avoid writing the in-memory contents to disk, with some extra complexity.
Carlos Martín Nieto committed -
Allow setting the buffer size on open in order to use this data structure more generally as a spill buffer, with larger buffer sizes for specific use-cases.
Carlos Martín Nieto committed -
Remove the now-unnecessary entries vector. Add `git_array_search` to binary search through an array to accomplish this.
Edward Thomson committed -
Add a sanity check in git_indexer_commit to avoid subtraction overflow.
Carlos Martín Nieto committed -
Fix some errors I found in the changelog for 0.24.0
Carlos Martín Nieto committed -
Reuse a tree's buffer and allocate constant-sized entries in an array
Edward Thomson committed
-
- 20 Mar, 2016 2 commits
-
-
Take advantage of the constant size of tree-owned arrays and store them in an array instead of a pool. This still lets us free them all at once but lets the system allocator do the work of fitting them in.
Carlos Martín Nieto committed -
Instead of copying over the data into the individual entries, point to the originals, which are already in a format we can use.
Carlos Martín Nieto committed
-
- 18 Mar, 2016 4 commits
-
-
John Fultz committed
-
win32: free thread-local data on thread exit
Edward Thomson committed -
Carlos Martin Nieto committed
-
MinGW builds should optionally create DLLs without "lib" prefix
Edward Thomson committed
-
- 17 Mar, 2016 3 commits
-
-
Custom merge drivers and proper gitattributes `merge` handling
Carlos Martín Nieto committed -
CONTRIBUTING: document the optional tests
Carlos Martín Nieto committed -
Edward Thomson committed
-