summaryrefslogtreecommitdiff
path: root/tests/config/global.c
Commit message (Collapse)AuthorAgeFilesLines
* config: add a ProgramData levelcmn/programdata-configCarlos Martín Nieto2015-10-211-0/+40
| | | | | This is where portable git stores the global configuration which we can use to adhere to it even though git isn't quite installed on the system.
* git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson2015-09-171-3/+3
| | | | | | | | | | | | Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-3/+5
| | | | | | | | | | | | | | | This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
* Better search path sandboxingrb/restore-search-pathsRussell Belfer2014-05-151-27/+1
| | | | | | | 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.
* Improve handling of fake home directoryRussell Belfer2014-05-021-8/+27
| | | | | | | | | | 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.
* Rename tests-clar to testsBen Straub2013-11-141-0/+72