- 17 Nov, 2015 2 commits
-
-
Don't put the configuration in a subdir of the sandbox named `config`, lest some tests decide to create their own directory called `config`. Prefix with some underscores for uniqueness.
Edward Thomson committed -
Edward Thomson committed
-
- 14 Sep, 2015 1 commit
-
-
Edward Thomson committed
-
- 12 Jul, 2015 1 commit
-
-
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.
Matthew Plough 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
-
- 09 Dec, 2014 1 commit
-
-
Edward Thomson committed
-
- 26 Nov, 2014 1 commit
-
-
Jeff Hostetler committed
-
- 15 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
-
- 08 May, 2014 1 commit
-
-
One of the test helpers provides a quick way for looking up a boolean key. But if the key way missing completely, the check would actually raise an error. Given the way we use this helper, if the key is missing, this should just return false, I think.
Russell Belfer committed
-
- 02 May, 2014 2 commits
-
-
Trying to find other issues where tests may not clean up quite properly when they are through...
Russell Belfer committed -
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
-
- 20 Apr, 2014 1 commit
-
-
Philip Kelley 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
-
- 09 Feb, 2014 2 commits
-
-
Edward Thomson committed
-
Not closing the files on a diff failure ensures that clar cleanup will fail on win32 because we still have the file open.
Edward Thomson committed
-
- 14 Nov, 2013 1 commit
-
-
Ben Straub committed
-
- 08 Oct, 2013 3 commits
-
-
Russell Belfer committed
-
Before these changes, looking up a reference would return the same precomposed or decomposed form of the reference name that was used to look it up, so on MacOS which ignores the difference between the two, a single reference could be looked up either way and git_reference_name would return the form of the name that was used to look it up! This change makes lookup always return the precomposed name if core.precomposeunicode is set regardless of which version was used to look it up. The reference iterator was already returning the precomposed form from earlier work. This also updates the CMakeLists.txt rules for enabling iconv usage because the clar tests for this code were actually not being activated properly with the old version. Finally, this moves git_repository_reset_filesystem from include/ git2/repository.h to include/git2/sys/repository.h since it is not really a function that normal library users should have to think about very often.
Russell Belfer committed -
This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
Russell Belfer committed
-
- 04 Oct, 2013 1 commit
-
-
When a repository is transferred from one file system to another, many of the config settings that represent the properties of the file system may be wrong. This adds a new public API that will refresh the config settings of the repository to account for the change of file system. This doesn't do a full "reinitialize" and operates on a existing git_repository object refreshing the config when done. This commit then makes use of the new API in clar as each test repository is set up. This commit also has a number of other clar test fixes where we were making assumptions about the type of filesystem, either based on outdated config data or based on the OS instead of the FS.
Russell Belfer committed
-
- 03 Oct, 2013 1 commit
-
-
This hooks up git_path_direach and git_path_dirload so that they will take a flag indicating if directory entry names should be tested and converted from decomposed unicode to precomposed form. This code will only come into play on the Apple platform and even then, only when certain types of filesystems are used. This involved adding a flag to these functions which involved changing a lot of places in the code. This was an opportunity to do a bit of code cleanup here and there, for example, getting rid of the git_futils_cleanupdir_r function in favor of a simple flag to git_futils_rmdir_r to not remove the top level entry. That ended up adding depth tracking during rmdir_r which led to a safety check for infinite directory recursion. Yay. This hasn't actually been tested on the Mac filesystems where the issue occurs. I still need to get test environment for that.
Russell Belfer 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
-
-
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 -
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
-
- 04 Sep, 2013 1 commit
-
-
Some windows tests were failing
Russell Belfer committed
-
- 13 Aug, 2013 3 commits
-
-
This is just a bunch of small fixes that I noticed while looking at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking for an empty directory (not exiting loop asap), makes the dir name in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation, and fixes some slightly odd assumptions in the cl_getenv helper.
Russell Belfer committed -
Russell Belfer committed
-
Vicent Marti committed
-
- 08 Aug, 2013 2 commits
-
-
Ben Straub committed
-
Ben Straub committed
-
- 07 Aug, 2013 1 commit
-
-
...and normalize the signatures of the two conversion functions.
Ben Straub committed
-
- 05 Aug, 2013 1 commit
-
-
Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
Ben Straub 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 1 commit
-
-
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
-