summaryrefslogtreecommitdiff
path: root/tests/clar_libgit2.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the `-DENABLE_WERROR=ON` build for gcc 10.2lhchavez2020-12-211-3/+4
| | | | | | | | | | | | | | | | | This change makes it possible to build with newer versions of gcc without warnings. There were two warnings issued: * gcc 8 added [`-Wstringop-truncation`](https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/), which warns if a call to `strncpy(3)` is prone to accidentally truncating the destination string, since `strncpy(3)` does NOT add a terminating `NULL` if the destination buffer is not large enough to hold the input. This change uses the pattern suggested in https://us-cert.cisa.gov/bsi/articles/knowledge/coding-practices/strncpy-and-strncat to fix the locations flagged by gcc. * There was a potentially uninitialized access of `dest` in `fs_copy`.
* clar: include the function nameethomson/clar_tapEdward Thomson2020-06-051-6/+7
|
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-221-2/+2
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* tests: add a helper to build sandbox subpaths quicklyEtienne Samson2018-06-291-0/+29
|
* mailmap: API and style cleanupNika Layzell2018-06-141-2/+1
|
* mailmap: Switch mailmap parsing to use the git_parse moduleNika Layzell2018-06-141-2/+1
|
* mailmap: Support path fixtures in cl_git_repository_init()Nika Layzell2018-06-141-3/+9
|
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-6/+6
|
* tests: provide better pass/failure error messagesEdward Thomson2017-02-171-3/+11
| | | | | | Provide more detailed messages when conditions pass or fail unexpectedly. In particular, this provides the error messages when a test fails with a different error code than was expected.
* tests: use out-of-the-way config dir in sandboxEdward Thomson2015-11-171-5/+12
| | | | | | 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.
* tests: set PROGRAMDATA directory for running testsEdward Thomson2015-11-171-0/+2
|
* cl_git_path_url: assert sane static buffer sizeEdward Thomson2015-09-141-0/+2
|
* Merge branch 'portable-zu'Carlos Martín Nieto2015-07-121-2/+2
|\
| * Fix #3094 - improve use of portable size_t/ssize_t format specifiers.Matthew Plough2015-07-121-2/+2
| | | | | | | | 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.
* | git__getenv: utf-8 aware env readerEdward Thomson2015-07-021-20/+23
|/ | | | | | 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).
* Introduce cl_git_sandbox_init_new()Edward Thomson2015-05-281-0/+8
| | | | | cl_git_sandbox_init_new() will create a clar temp directory and initialize a new repository at that location.
* win32: further cleanups for 8.3 disablingEdward Thomson2015-02-031-0/+22
|
* Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small ↵Pierre-Olivier Latour2015-01-141-0/+5
| | | | | | | | | | | | | files 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.
* win32: remember to free wide env name/valueEdward Thomson2014-12-091-1/+3
|
* fix cl_git_mkfile() to test for -1 rather than 0 for errors from p_creat()Jeff Hostetler2014-11-261-1/+1
|
* Switch description and path reportingEdward Thomson2014-07-151-1/+1
|
* Better search path sandboxingrb/restore-search-pathsRussell Belfer2014-05-151-0/+13
| | | | | | | 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.
* Allow cl_repo_get_bool to work with missing keyRussell Belfer2014-05-081-1/+2
| | | | | | | 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.
* Some further sandboxing cleanups to testsRussell Belfer2014-05-021-3/+5
| | | | | Trying to find other issues where tests may not clean up quite properly when they are through...
* Improve handling of fake home directoryRussell Belfer2014-05-021-10/+21
| | | | | | | | | | 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.
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-191-30/+23
|
* Fix core.excludesfile named .gitignorerb/fix-leading-slash-ignoresRussell Belfer2014-04-141-0/+21
| | | | | | | | | | | | | | | | | 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.
* Tests for core.autocrlf and .gitattributesEdward Thomson2014-02-091-0/+8
|
* Close files on file diff failureEdward Thomson2014-02-091-0/+1
| | | | | Not closing the files on a diff failure ensures that clar cleanup will fail on win32 because we still have the file open.
* Rename tests-clar to testsBen Straub2013-11-141-0/+483