tests


Log

Author Commit Date CI Message
Carlos Martín Nieto ceb58739 2015-07-13T18:50:39 Merge pull request #3302 from libgit2/cmn/submodule-foreach-diff-path List a submodule only once when the path matches a submodule in the index
Carlos Martín Nieto f861abad 2015-07-12T19:56:19 Merge branch 'portable-zu'
Matthew Plough 768f8be3 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Carlos Martín Nieto a34c4f8d 2015-07-11T13:32:57 submdule: reproduce double-reporting of a submodule in foreach When we rename a submodule, we should be merging two sets of information based on whether their path is the same. We currently only deduplicate on equal name, which causes us to double-report.
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
Edward Thomson 43ce8cb5 2015-07-07T16:46:20 revert: correct test that added trailing newline
Edward Thomson ae8f7260 2015-07-07T16:59:14 merge_files: don't add trailing newlines When invoked with three files that each lack a trailing newline, the merge result should also lack a trailing newline.
Carlos Martín Nieto 3704ac35 2015-07-07T12:38:47 Merge pull request #3277 from git-up/git_diff_index_to_index Added git_diff_index_to_index()
Carlos Martín Nieto ea445e06 2015-07-07T00:48:17 Merge pull request #3288 from ethomson/getenv git__getenv: utf-8 aware env reader
Carlos Martín Nieto 3c831113 2015-07-06T19:04:48 Merge pull request #3202 from jeffhostetler/windows_stack_trace Stacktraces with CRTDBG memory leaks on Windows
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).
Carlos Martín Nieto f034c851 2015-07-02T17:55:16 Merge pull request #3287 from ethomson/filter_test_cleanup filter::stream: free the filter sanely
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).
Carlos Martín Nieto e8e848a8 2015-07-01T21:10:40 submodule: add failing test for loading the wrong submodule When two submodules are fairly similar, we may end up loading the wrong one.
Carlos Martín Nieto 34065968 2015-07-01T17:49:07 submodule: completely remove reload_all The function was removed, but its declaration and changelog entry about its removal were forgotten. The comment in the test doesn't make any sense as the function doesn't exist anymore, so get rid of it as well.
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.
Pierre-Olivier Latour ccef5adb 2015-06-30T09:30:20 Added git_diff_index_to_index()
Edward Thomson eb29292a 2015-06-30T14:25:51 index tests: add eol to avoid compiler warning
Edward Thomson 504b0697 2015-06-30T14:25:00 checkout test: mark unused vars
Carlos Martín Nieto 7bfdd1c2 2015-06-30T10:21:06 Merge pull request #3270 from ethomson/warnings2 Remove some warnings
Edward Thomson 64c415c2 2015-06-29T22:12:20 checkout test: check getcwd return value
Edward Thomson eadf3715 2015-06-29T22:10:45 clar: test chdir
Edward Thomson d88abb89 2015-06-29T21:54:06 filter test: pass base type
Edward Thomson 0175971e 2015-06-29T15:21:22 stash: const up conflict params
Edward Thomson 2cf33fee 2015-06-29T15:20:34 index test: include repository.h for decl
Jeff Hostetler 93b42728 2015-06-09T14:38:30 Include stacktrace summary in memory leak output.
Carlos Martín Nieto c28a5c97 2015-06-29T21:10:47 submodule: remove trailing slashes from submodule paths We allow looking up a submodule by path, but we lost the path normalisation during the recent changes. Bring it back.
Carlos Martín Nieto fa399750 2015-06-27T21:26:27 Merge pull request #3265 from libgit2/leaks Plug a bunch of leaks
Carlos Martín Nieto 92ec9ed3 2015-06-27T21:15:00 Merge pull request #3260 from ethomson/apply_with_reflog_indices stash: test we apply using reflog-like indices
Carlos Martín Nieto 24fa21f3 2015-06-26T18:59:53 index, iterator, fetchhead: plug leaks
Carlos Martín Nieto afd8a94e 2015-06-26T18:49:39 checkout: plug a few leaks
Carlos Martín Nieto 9568660f 2015-06-26T18:31:39 diff: fix leaks in diff printing
Carlos Martín Nieto cfafeb84 2015-06-26T18:11:05 Merge pull request #3263 from git-up/fixes Fixes
Edward Thomson ee6eed51 2015-06-25T19:04:04 stash: test we apply using reflog-like indices
Carlos Martín Nieto 354268ca 2015-06-26T17:46:35 Merge pull request #3259 from ethomson/stash_apply_argh Stash apply: stage new files even when not updating the index
Pierre-Olivier Latour 492851c9 2015-06-26T08:18:06 Removed unused variables
Vicent Marti 13e5e344 2015-06-26T16:52:26 test-diff-blob: Pass proper nibble sizes
Vicent Marti a2f8d1ae 2015-06-26T16:48:58 revparse: Add test to make sure this doesn't regress
Edward Thomson 619423f2 2015-06-19T11:11:12 diff: test we don't update index unnecessarily Test that workdir diffs, when presented with UPDATE_INDEX, only write the index when they actually make a change.
Edward Thomson c0280bdd 2015-06-25T18:55:48 Merge pull request #3255 from libgit2/cmn/rename-unspecified Rename FALLBACK to UNSPECIFIED
Edward Thomson b7f5cb8d 2015-06-20T19:33:15 stash: stage new files when unstashing them Files that were new (staged additions) in the stash tree should be staged when unstashing, even when not applying the index.
Edward Thomson 82b1c93d 2015-06-20T13:44:22 stash: don't allow apply with staged changes
Edward Thomson 1db6a0ab 2015-06-19T17:29:59 stash apply: add a newly staged file to tests
Edward Thomson 3b66c6a3 2015-06-25T15:36:53 Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchhead remote: insert refspecs with no rhs in FETCH_HEAD
Edward Thomson 87987fd1 2015-06-25T15:26:43 Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed Don't allow growing borrowed buffers
Carlos Martín Nieto 23aa7c90 2015-06-25T13:40:38 remote: insert refspecs with no rhs in FETCH_HEAD When a refspec contains no rhs and thus won't cause an explicit update, we skip all the logic, but that means that we don't update FETCH_HEAD with it, which is what the implicit rhs is. Add another bit of logic which puts those remote heads in the list of updates so we put them into FETCH_HEAD.
Carlos Martín Nieto c2418f46 2015-06-25T12:48:44 Rename FALLBACK to UNSPECIFIED Fallback describes the mechanism, while unspecified explains what the user is thinking.
Carlos Martín Nieto a6599235 2015-06-24T19:32:56 buffer: make use of EINVALID for growing a borrowed buffer This explains more closely what happens. While here, set an error message.
Carlos Martín Nieto caab22c0 2015-06-23T15:41:58 buffer: don't allow growing borrowed buffers When we don't own a buffer (asize=0) we currently allow the usage of grow to copy the memory into a buffer we do own. This muddles the meaning of grow, and lets us be a bit cavalier with ownership semantics. Don't allow this any more. Usage of grow should be restricted to buffers which we know own their own memory. If unsure, we must not attempt to modify it.
Carlos Martín Nieto daacf96d 2015-06-24T23:34:40 Merge pull request #3097 from libgit2/cmn/submodule-config-state Remove run-time configuration settings from submodules
Carlos Martín Nieto 9d5efab8 2015-06-24T21:13:23 Merge pull request #3254 from ethomson/diff-binary-patch Handle binary DIFFABLEness properly
Carlos Martín Nieto c2f274c6 2015-06-24T19:47:34 Merge pull request #3250 from ethomson/stash Stash workdir correctly when added in the index, modified in the workdir
Edward Thomson ba8fb7c4 2015-06-24T11:39:59 diff::binary tests: empty diff when forced binary Ensure that even when we're forcing a binary diff that we do not assume that there *is* a diff. There should be an empty diff for no change.
Carlos Martín Nieto 76633215 2015-06-24T14:25:36 binary diff: test that the diff and patch otputs are the same We test the generation of the textual patch via the patch function, which are just one of two possibilities to get the output. Add a second patch generation via the diff function to make sure both outputs are in sync.
Pierre-Olivier Latour 8113056c 2015-06-23T20:57:09 Fixed Xcode 6.1 build warnings
Edward Thomson cc605e73 2015-06-23T23:52:03 Merge pull request #3222 from git-up/conflicted Fixed GIT_DELTA_CONFLICTED not returned in some cases
Edward Thomson bd670abd 2015-06-23T23:30:58 Merge pull request #3226 from libgit2/cmn/racy-diff-again racy-git, the missing link
Edward Thomson 14304b0e 2015-06-23T16:27:17 stash tests: ensure we save the workdir file Ensure that when a file is added in the index and subsequently modified in the working directory, the stashed working directory tree contains the actual working directory contents.
Carlos Martín Nieto 16c73d38 2015-06-23T20:44:27 repository: check the format version This is something we do on re-init but not when opening a repository. This hasn't particularly mattered up to now as the version has been 0 ever since the first release of git, but the times, they're a-changing and we will soon see version 1 in the wild. We need to make sure we don't open those.
Pierre-Olivier Latour 8d8a2eef 2015-06-15T11:14:40 Fixed GIT_DELTA_CONFLICTED not returned in some cases If an index entry for a file that is not in HEAD is in conflicted state, when diffing HEAD with the index, the status field of the corresponding git_diff_delta was incorrectly reported as GIT_DELTA_ADDED instead of GIT_DELTA_CONFLICTED. This was due to handle_unmatched_new_item() initially setting the status to GIT_DELTA_CONFLICTED but then overriding it later with GIT_DELTA_ADDED.
Pierre-Olivier Latour cb63e7e8 2015-06-17T08:55:09 Explicitly handle GIT_DELTA_CONFLICTED in git_diff_merge() This fixes a bug where if a file was in conflicted state in either diff, it would not always remain in conflicted state in the merged diff.
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 8293c8f9 2015-06-08T13:51:28 git_buf_text_lf_to_crlf: allow mixed line endings Allow files to have mixed line endings instead of skipping processing on them.
Edward Thomson 71686ddc 2015-06-08T11:55:04 clar: support hierarchical test resource data Support hierarchical test resource data, such that you can have `tests/resources/foo/bar` and move the `bar` directory in as a fixture. Calling `cl_fixture_sandbox` on a path that is not directly beneath the test resources directory succeeds, placing that directory into the test fixture. (For example, `cl_fixture_sandbox("foo/bar")` will sandbox the `foo/bar` directory as `bar`). Add support for cleaning up directories created this way, by only cleaning up the basename (in this example, `bar`) from the fixture directory.
Edward Thomson e774fa6c 2015-06-09T14:47:29 crlf tests: posix known-good data A corpus of files checked out with Git (Linux, 1.9.1) to ensure that produce identical data when checking out using a CRLF filter.
Edward Thomson 4ebe320a 2015-06-09T10:37:14 crlf tests: windows known-good data A corpus of files checked out with Git for Windows (2.4.1.windows.1) to ensure that we produce identical data when checking out using a CRLF filter.
Edward Thomson 3d92b9ab 2015-06-08T09:08:01 crlf tests: use known-good data produced by git Given a variety of combinations of core.autocrlf settings and attributes settings, test that we check out data into the working directory the same as a known-good test resource created by git.git.
Edward Thomson bf8c0a9b 2015-06-08T09:06:53 crlf: script to generate expected crlf data Include a shell script that will generate the expected CRLF data, calling git.git to capture its output as a test resource for the current platform.
Edward Thomson bd5e59ee 2015-06-08T09:04:39 crlf: include utf8 resources in master branch Include the UTF8 and UTF8 BOM tests in the master crlf test branch for completeness.
Edward Thomson 84f8f500 2015-06-05T10:11:50 crlf: include additional test resources Include additional test data for CRLF tests: files with mixed line endings and binary files.
Carlos Martín Nieto 04963300 2015-05-11T11:57:05 submodule: test unsetting config options In addition to mapping enums to strings in the configuration, we need to know to delete the configuration option when given the "none" or "no" option.
Carlos Martín Nieto 4536574a 2015-05-05T16:29:38 submodule: test more accurately for non-existence The current code will always fail, but only because it's asking for a string on a live config. Take a snapshot and make sure we fail with ENOTFOUND instead of any old error.
Carlos Martín Nieto adb58f7d 2015-05-05T16:21:57 submodule: fix potential leak in the tests
Carlos Martín Nieto 961861fa 2015-05-05T09:25:17 submodule: get rid of `_save()` We no longer have any setters which affect an instance, so `git_submodule_save()` is no longer relevant.
Carlos Martín Nieto d6073b30 2015-05-05T09:22:35 submodule: make `_set_url()` affect the configuration With this one, we can get rid of the edit_and_save test.
Carlos Martín Nieto 486ba4cd 2015-05-05T09:13:52 submodule: make `_set_branch()` affect the configuration
Carlos Martín Nieto 4e636423 2015-05-05T09:01:20 submodule: make `_set_update_fetch_recurse_submodules()` affect the config Similarly to the other ones. In this test we copy over testing `RECURSE_YES` which shows an error in our handling of the `YES` variant which we may have to port to the rest.
Carlos Martín Nieto e8a39f8e 2015-05-05T08:35:29 submodule: make `_set_update()` affect the configuration Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
Carlos Martín Nieto c6f489c9 2015-05-04T17:29:12 submodule: add an ignore option to status This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
Carlos Martín Nieto 64bbd47a 2015-05-04T17:09:21 submodule: don't let status change an existing instance As submodules are becomes more like values, we should not let a status check to update its properties. Instead of taking a submodule, have status take a repo and submodule name.
Carlos Martín Nieto 5a9fc6c8 2015-05-04T16:22:56 submodule: make set_ignore() affect the configuration Instead of affecting a particular instance, make it change the configuration.
Carlos Martín Nieto dfda2f68 2015-04-27T19:27:29 submodule: remove the per-repo cache Having this cache and giving them out goes against our multithreading guarantees and it makes it impossible to use submodules in a multi-threaded environment, as any thread can ask for a refresh which may reallocate some string in the submodule struct which we've accessed in a different one via a getter. This makes the submodules behave more like remotes, where each object is created upon request and not shared except explicitly by the user. This means that some tests won't pass yet, as they assume they can affect the submodule objects in the cache and that will affect later operations.
Carlos Martín Nieto 6e611f7c 2015-06-22T14:17:39 index: add a diff test for smudging a file which becomes empty Even though the file is empty and thus the size in the entry matches, we should be able to detect it as a difference.
Carlos Martín Nieto 27133caf 2015-06-20T17:20:07 tests: move racy tests to the index They fit there much better, even though we often check by diffing, it's about the behaviour of the index.
Carlos Martín Nieto 5b05f954 2015-06-20T13:17:06 merge: work around write-side racy protection when hacking the index As we attempt to replicate a situation in which an older checkout has put a file on disk with different filtering settings from us, set the timestamp on the entry and file to a second before we're performing the operation so the entry in the index counts as old. This way we can test that we're not looking at the on-disk file when the index has the entry and we detect it as clean.
Carlos Martín Nieto a3f42fe8 2015-06-22T15:32:29 commit: allow retrieving an arbitrary header field This allows the user to look up fields which we don't parse in libgit2, and allows them to access gpgsig or mergetag fields if they wish to check the signature.
Carlos Martín Nieto 26432a9c 2015-06-20T12:37:32 tests: set racy times manually
Carlos Martín Nieto 6c5eaead 2015-06-20T12:36:58 tests: plug leaks in the racy test
Carlos Martín Nieto ff475375 2015-06-17T14:34:10 diff: check files with the same or newer timestamps When a file on the workdir has the same or a newer timestamp than the index, we need to perform a full check of the contents, as the update of the file may have happened just after we wrote the index. The iterator changes are such that we can reach inside the workdir iterator from the diff, though it may be better to have an accessor instead of moving these structs into the header.
Edward Thomson fc656802 2015-06-19T08:31:07 status: test that symlinks don't lose their mode Test to ensure that when status updates an index, it does not alter the original mode for file types that are not supported (eg, symlinks on Windows).
Edward Thomson 9018529b 2015-06-20T14:34:34 Merge pull request #3238 from git-up/double_free Fixed index being double-freed in stash tests
Edward Thomson 883cb642 2015-06-20T14:05:02 Merge pull request #3236 from libgit2/cmn/index-checksum Use the checksum to check whether an index has been modified
Pierre-Olivier Latour 07ea3a7f 2015-06-20T10:57:03 Fixed index being double-freed in stash tests
Carlos Martín Nieto 863dd89a 2015-06-18T12:45:40 tests: tick over five seconds instead of one When ticking over one second, it can happen that the actual time ticks over the same second between the time that we undermine our own race protections and the time in which we perform the index update. Such timing would make the time in the entries match the index' timestamp and we have not gained anything. Ticking over five seconds makes it so that if real-time rolls over that second, our index is still ahead. This is still suboptimal as we're dealing with timing, but five seconds should be long enough for any reasonable test runner to finish the tests.
Carlos Martín Nieto 46c84c72 2015-06-19T21:56:42 index: user a better assertion when comparing sizes This will tell us which numbers we were trying to compare, rather than just telling us that they're different.
Pierre-Olivier Latour 85a5e8eb 2015-06-17T09:00:23 Fixed Xcode 6.1 build warnings
Jeff Hostetler 534d136d 2015-06-17T08:52:28 Fix memory leak in tests/network/refspecs.c
Carlos Martín Nieto a56db992 2015-06-17T08:15:49 Merge pull request #3219 from libgit2/cmn/racy-diff Zero out racily-clean entries' file_size