- 12 Dec, 2016 1 commit
-
-
The function `cl_git_thread_check()` is defined as static. As the function is defined in a header file which is included by our tests, this can result in warnings for every test file where `cl_git_thread_check` is never used. Fix the issue by marking it as inline instead.
Patrick Steinhardt committed
-
- 18 Nov, 2016 2 commits
-
-
Edward Thomson committed
-
Don't `cl_git_pass` in a child thread. When the assertion fails, clar will `longjmp` to its error handler, but: > The effect of a call to longjmp() where initialization of the jmp_buf > structure was not performed in the calling thread is undefined. Instead, set up an error context that threads can populate, and the caller can check.
Edward Thomson committed
-
- 02 Jul, 2015 1 commit
-
-
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 committed
-
- 28 May, 2015 1 commit
-
-
cl_git_sandbox_init_new() will create a clar temp directory and initialize a new repository at that location.
Edward Thomson committed
-
- 04 Feb, 2015 1 commit
-
-
Edward Thomson committed
-
- 14 Jan, 2015 1 commit
-
-
The implementation of the hashsig API disallows computing a signature on small files containing only a few lines. This new flag disables this behavior. git_diff_find_similar() sets this flag by default which means that rename / copy detection of small files will now work. This in turn affects the behavior of the git_status and git_blame APIs which will now detect rename of small files assuming the right options are passed.
Pierre-Olivier Latour committed
-
- 05 Aug, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 01 Jul, 2014 1 commit
-
-
Edward Thomson committed
-
- 15 May, 2014 1 commit
-
-
There are a number of tests that modify the global or system search paths during the tests. This adds a helper function to make it easier to restore those paths and makes sure that they are getting restored in a manner that preserves test isolation.
Russell Belfer committed
-
- 02 May, 2014 1 commit
-
-
There are a few tests that set up a fake home directory and a fake GLOBAL search path so that we can test things in global ignore or attribute or config files. This cleans up that code to work more robustly even if there is a test failure. This also fixes some valgrind warnings where scanning search paths for separators could end up doing a little bit of sketchy data access when coming to the end of search list.
Russell Belfer committed
-
- 22 Apr, 2014 1 commit
-
-
Edward Thomson committed
-
- 17 Apr, 2014 1 commit
-
-
This adds a basic test of doing simultaneous diffs on multiple threads and adds basic locking for the attr file cache because that was the immediate problem that arose from these tests.
Russell Belfer committed
-
- 14 Apr, 2014 1 commit
-
-
Ignore rules with slashes in them are matched using FNM_PATHNAME and use the path to the .gitignore file from the root of the repository along with the path fragment (including slashes) in the ignore file itself. Unfortunately, the relative path to the .gitignore file was being applied to the global core.excludesfile if that was also named ".gitignore". This fixes that with more precise matching and includes test for ignore rules with leading slashes (which were the primary example of this being broken in the real world). This also backports an improvement to the file context logic from the threadsafe-iterators branch where we don't rely on mutating the key of the attribute file name to generate the context path.
Russell Belfer committed
-
- 06 Apr, 2014 1 commit
-
-
Russell Belfer committed
-
- 09 Feb, 2014 1 commit
-
-
Edward Thomson committed
-
- 14 Nov, 2013 1 commit
-
-
Ben Straub committed
-
- 26 Sep, 2013 1 commit
-
-
nulltoken committed
-
- 24 Sep, 2013 1 commit
-
-
The git_buf_text_gather_stats call returns a boolean indicating if the file looks like binary data. That shouldn't be an error; it should be used to skip CRLF processing though.
Russell Belfer committed
-
- 17 Sep, 2013 3 commits
-
-
This updates clar to the version without cl_assert_equal_sz and then adds a new version of that macro the clar_libgit2.h. The new version works around a strange issue that seemed to be arising on release builds with VS 10 64-bit builds.
Russell Belfer committed -
There were a lot of places in the test code base that were creating a commit from the index on the current branch. This just adds a helper to handle that case pretty easily. There was only one test where this change ended up tweaking the test data, so pretty easy and mostly just a cleanup.
Russell Belfer committed -
These are a couple of new clar helpers for testing that a file has expected contents that I extracted from the checkout code. Actually wrote this as part of an abandoned earlier attempt at a new filters API, but it will be useful now for some of the tests I'm going to write.
Russell Belfer committed
-
- 12 Sep, 2013 1 commit
-
-
nulltoken committed
-
- 04 Sep, 2013 2 commits
-
-
Some windows tests were failing
Russell Belfer committed -
It seems that libgit2 is correctly applying the umask when initializing a repository from a template and when creating new directories during checkout, but the test suite is not accounting for possible variations due to the umask. This updates that so that the test suite will work regardless of the umask.
Russell Belfer committed
-
- 31 Jul, 2013 1 commit
-
-
After doing further profiling, I found that a lot of time was being spent attempting to insert hashes into the file hash signature when using the rolling hash because the rolling hash approach generates a hash per byte of the file instead of one per run/line of data. To optimize this, I decided to convert back to a run-based file signature algorithm which would be more like core Git. After changing this, a number of the existing tests started to fail. In some cases, this appears to have been because the test was coded to be too specific to the particular results of the file similarity metric and in some cases there appear to have been bugs in the core rename detection code where only by the coincidence of the file similarity scoring were the expected results being generated. This renames all the variables in the core rename detection code to be more consistent and hopefully easier to follow which made it a bit easier to reason about the behavior of that code and fix the problems that I was seeing. I think it's in better shape now. There are a couple of tests now that attempt to stress test the rename detection code and they are quite slow. Most of the time is spent setting up the test data on disk and in the index. When we roll out performance improvements for index insertion, it should also speed up these tests I hope.
Russell Belfer committed
-
- 10 Jul, 2013 1 commit
-
-
This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
Russell Belfer committed
-
- 10 May, 2013 1 commit
-
-
The git_status_file API was doing a hack to deal with files that are inside ignored directories. The status scan was not reporting any file in this case, so git_status_file would attempt a final "stat()" call, and return IGNORED if the file actually existed. On case-insensitive filesystems where core.ignorecase is set incorrectly, this magic check can "succeed" and report a file as ignored when it should actually return ENOTFOUND. Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can use that flag to make sure that git_status_file() will look into ignored directories and eliminate the hack completely, so we give the correct error.
Russell Belfer committed
-
- 22 Mar, 2013 2 commits
-
-
This adds a helper function for the cases where you want to quickly set a single boolean config value for a repository. This allowed me to remove a lot of code.
Russell Belfer committed -
This makes the size_t comparison test nicer (assuming that the values are actually not using the full length), and converts some cases that were using it for pointer comparison to use the macro that is designed for pointer comparison.
Russell Belfer committed
-
- 04 Jan, 2013 1 commit
-
-
This adds a failure reporting function that is called by cl_git_pass which captures the actual error return code and the error message if available in the failure report.
Russell Belfer committed
-
- 03 Jan, 2013 1 commit
-
-
Vicent Marti committed
-
- 02 Jan, 2013 1 commit
-
-
Vicent Marti committed
-
- 17 Nov, 2012 1 commit
-
-
nulltoken committed
-
- 10 Nov, 2012 1 commit
-
-
Ben Straub committed
-
- 18 Oct, 2012 1 commit
-
-
Philip Kelley committed
-
- 23 Aug, 2012 1 commit
-
-
Russell Belfer committed
-
- 19 Jun, 2012 1 commit
-
-
This fixes git_index_add and git_index_append to behave more like core git, preserving old filemode data in the index when adding and/or appending with core.filemode = false. This also has placeholder support for core.symlinks and core.ignorecase, but those flags are not implemented (well, symlinks has partial support for preserving mode information in the same way that git does, but it isn't tested).
Russell Belfer committed
-
- 08 Jun, 2012 2 commits
-
-
File modes were both not being ignored properly on platforms where they should be ignored, nor be diffed consistently on platforms where they are supported. This change adds a number of diff and status filemode change tests. This also makes sure that filemode-only changes are included in the diff output when they occur and that filemode changes are ignored successfully when core.filemode is false. There is no code that automatically toggles core.filemode based on the capabilities of the current platform, so the user still needs to be careful in their .git/config file.
Russell Belfer committed -
Ben Straub committed
-