Commit Graph

8 Commits

Author SHA1 Message Date
Carlos Martín Nieto
9a97f49e3a config: borrow refcounted references
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.
2015-03-03 18:35:12 +01:00
Edward Thomson
feb0e02286 tests: separate INVASIVE filesystem tests
Introduce GITTEST_INVASIVE_FS_STRUCTURE for things that are invasive
to your filesystem structure (like creating folders at your filesystem
root) and GITTEST_INVASIVE_FS_SIZE for things that write lots of data.
2015-02-19 12:14:06 -05:00
Edward Thomson
865baaf928 repo: ensure we can create repo at filesystem root
Test to ensure that we can create a repository at the filesystem
root.  Introduces a new test environment variable,
`GITTEST_INVASIVE_FILESYSTEM` for tests that do terrible things like
escaping the clar sandbox and writing to the root directory.  It is
expected that the CI builds will enable this but that normal people
would not want this.
2015-02-05 11:59:03 -05:00
Edward Thomson
3b40ed897f repo::init test: create hook symlink
Remove the hook symlink from the test resources, so that we can
have a source tree that is easy to zip up and copy around on systems
that don't support symlinks.  Create it dynamically at test execution
instead.
2015-01-08 19:23:37 +00:00
Carlos Martín Nieto
209425ce26 remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
2014-11-08 13:28:27 +01:00
Carlos Martín Nieto
25abbc27a7 Clean up some leaks in the test suite 2014-09-17 03:19:40 +02:00
Jameson Miller
bc737620dd Introduce option to use relative paths for repository work directory
Teach git_repository_init_ext to use relative paths for the gitlink
to the work directory. This is used when creating a sub repository
where the sub repository resides in the parent repository's
.git directory.
2014-09-02 21:07:26 -04:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00