summaryrefslogtreecommitdiff
path: root/tests/config/include.c
Commit message (Collapse)AuthorAgeFilesLines
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-22/+28
| | | | | | | | | | | | | | | 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.
* Add test for include.path inside included configYury G. Kudryashov2015-02-131-0/+22
| | | | | | It fails at least on my computer, though it may depend on some unpredictable factors (say, will realloc() extend the memory segment in place, or it will allocate new memory).
* tests: use p_ instead of posix func directlyEdward Thomson2014-12-101-2/+2
|
* Clean up issues include.path issues found during code review.John Fultz2014-11-021-3/+4
| | | | | | | | * Error-handling is cleaned up to only let a file-not-found error through, not other sorts of errors. And when a file-not-found error happens, we clean up the error. * Test now checks that file-not-found introduces no error. And other minor cleanups.
* Make config reading continue after hitting a missing include file.John Fultz2014-11-011-0/+15
| | | | | | | | | | | For example, if you have [include] path = foo and foo didn't exist, git_config_open_ondisk() would just give up on the rest of the file. Now it ignores the unresolved include without error and continues reading the rest of the file.
* config: remove the refresh function and backend fieldcmn/config-refresh-removeCarlos Martín Nieto2014-10-231-23/+0
| | | | | | We have been refreshing on read and write for a while now, so git_config_refresh() is at best a no-op, and might just end up wasting cycles.
* Better search path sandboxingrb/restore-search-pathsRussell Belfer2014-05-151-0/+2
| | | | | | | 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.
* Rename tests-clar to testsBen Straub2013-11-141-0/+109