| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| | |
When we turned strict object creation validation on by default, we
forgot to inform the refs::create tests of this. They, in fact,
believed that strict object creation was off by default. As a result,
their cleanup function went and turned strict object creation off for
the remaining tests.
|
|/
|
|
| |
This lets us run with strict object creation on.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When passing -DUSE_OPENSSL:BOOL=OFF to cmake the testsuite will
fail with the following error:
core::stream::register_tls [/tmp/libgit2/tests/core/stream.c:40]
Function call failed: (error)
error -1 - <no message>
Fix test to assume failure for tls when built without openssl.
While at it also fix GIT_WIN32 cpp to check if it's defined
or not.
|
|\
| |
| | |
iterator/diff: allow trailing `/` on start/end paths to match submodules
|
| |
| |
| |
| |
| |
| | |
Allow callers to specify a start path with a trailing slash to match
a submodule, instead of just a directory. This is for some legacy
behavior that's sort of dumb, but there it is.
|
| |
| |
| |
| |
| | |
Test that submodules are found when the are included in a pathspec
but have a trailing slash.
|
|/
|
|
|
|
| |
If we're looking for a symlink, realpath will give us the resolved path,
which is not what we're after, but a canonicalized version of the path
the user asked for.
|
|\
| |
| | |
WD iterator: properly identify submodules
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
config: don't write duplicate section
|
| | |
|
| |
| |
| |
| |
| | |
We should notice that we are in the correct section to add. This is a
cosmetic bug, since replacing any of these settings does work.
|
|\ \
| |/
|/| |
config: don't special-case multivars that don't exist yet
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This special-casing ignores that we might have a locked file, so the
hashtable does not represent the contents of the file we want to
write. This causes multivar writes to overwrite entries instead of add
to them when under lock.
There is no need for this as the normal code-path will write to the file
just fine, so simply get rid of it.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
(It's slow!)
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Iterator tests were split over repo::iterator and diff::iterator,
with duplication between the two. Move them to iterator::index,
iterator::tree, and iterator::workdir.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Prior iterator implementations returned `GIT_ENOTFOUND` when
trying to advance into empty directories. Ensure that we no longer
do that and simply handle them gracefully.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
`git_iterator_advance_over` is a gnarly bit of code with no actual
tests.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Ensure that when specifying start/end paths, or pathlists, that we
deal correctly with submodules.
|
| |
| |
| |
| |
| | |
Expand the workdir tests to validate the paths in case sensitive
and insensitive tests.
|
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| | |
|
| |
| |
| |
| |
| | |
Do not abort iteration in the middle when encountering an unreadable
directory. Instead, skip it, as if it didn't exist.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| | |
| | | |
tree: drop the now-unnecessary entries vector
|
| | |
| | |
| | |
| | |
| | | |
Remove the now-unnecessary entries vector. Add `git_array_search`
to binary search through an array to accomplish this.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
Instead of copying over the data into the individual entries, point to
the originals, which are already in a format we can use.
|
| |
|
|
|
|
|
|
| |
Since the `apply` callback can defer, the `check` callback is not
necessary. Removing the `check` callback further makes the `payload`
unnecessary along with the `cleanup` callback.
|
|
|
|
|
|
|
| |
Ensure that setting the merge attribute forces the built-in default
`text` driver and does *not* honor the `merge.default` configuration
option. Further ensure that unsetting the merge attribute forces
a conflict (the `binary` driver).
|
| |
|
|
|
|
|
| |
When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT`
stop and product a conflict.
|