summaryrefslogtreecommitdiff
path: root/tests/repo/init.c
Commit message (Collapse)AuthorAgeFilesLines
* git_repository_init: include dotfiles when copying templatesEdward Thomson2015-12-261-1/+12
| | | | | | Include dotfiles when copying template directory, which will handle both a template directory itself that begins with a dotfile, and any dotfiles inside the directory.
* repo::init tests: test a template dir with leading dotEdward Thomson2015-12-261-9/+37
| | | | | Ensure that we can handle template directories that begin with a leading dot.
* repo::init tests: test init.templatedir settingEdward Thomson2015-12-261-38/+93
| | | | | Ensure that `git_repository_init` honors the `init.templatedir` configuration setting.
* 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.
* git__getenv: utf-8 aware env readerEdward Thomson2015-07-021-1/+1
| | | | | | 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).
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-12/+3
| | | | | | | | | | | | | | | 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.
* tests: separate INVASIVE filesystem testsEdward Thomson2015-02-191-1/+1
| | | | | | 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.
* repo: ensure we can create repo at filesystem rootEdward Thomson2015-02-051-0/+26
| | | | | | | | | 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.
* repo::init test: create hook symlinkEdward Thomson2015-01-081-9/+40
| | | | | | | 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.
* remote: rename _load() to _lookup()cmn/remote-lookupCarlos Martín Nieto2014-11-081-1/+1
| | | | This brings it in line with the rest of the lookup functions.
* Clean up some leaks in the test suiteCarlos Martín Nieto2014-09-171-0/+1
|
* Introduce option to use relative paths for repository work directoryjamill/relative_gitlinkJameson Miller2014-09-021-0/+78
| | | | | | | 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.
* Rename tests-clar to testsBen Straub2013-11-141-0/+606