summaryrefslogtreecommitdiff
path: root/tests-clar/repo/open.c
Commit message (Collapse)AuthorAgeFilesLines
* Add BARE option to git_repository_open_extRussell Belfer2013-07-101-4/+61
| | | | | | | | | | | This adds a BARE option to git_repository_open_ext which allows a fast open path that still knows how to read gitlinks and to search for the actual .git directory from a subdirectory. `git_repository_open_bare` is still simpler and faster, but having a gitlink aware fast open is very useful for submodules where we want to quickly be able to peek at the HEAD and index data without doing any other meaningful repo operations.
* repo: unconditionally create a global config backendCarlos Martín Nieto2013-05-071-1/+1
| | | | | | | | | | | | | When a repository is initialised, we need to probe to see if there is a global config to load. If this is not the case, the user isn't able to write to the global config without creating the backend and adding it themselves, which is inconvenient and overly complex. Unconditionally create and add a backend for the global config file regardless of whether it exists as a convenience for users. To enable this, we allow creating backends to files that do not exist yet, changing the semantics somewhat, and making some tests invalid.
* Catch issue in config set with no config fileRussell Belfer2013-04-301-0/+35
| | | | | This prevents a segfault when setting a value in the config of a repository that doesn't have a config file.
* Extensions to rmdir and mkdir utilitiesRussell Belfer2012-11-091-3/+3
| | | | | | | | | | | * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing combinations of flags * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that are left empty after removal * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file, not a dir (previously an EEXISTS error was ignored, even for files) and enable this flag for git_futils_mkpath2file call * Improve accuracy of error messages from git_futils_mkdir
* Add complex checkout test and then fix checkoutRussell Belfer2012-10-091-3/+3
| | | | | | | | | | | | | | | | This started as a complex new test for checkout going through the "typechanges" test repository, but that revealed numerous issues with checkout, including: * complete failure with submodules * failure to create blobs with exec bits * problems when replacing a tree with a blob because the tree "example/" sorts after the blob "example" so the delete was being processed after the single file blob was created This fixes most of those problems and includes a number of other minor changes that made it easier to do that, including improving the TYPECHANGE support in diff/status, etc.
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-1/+1
|
* errors: Rename the generic return codesVicent Martí2012-05-181-2/+2
|
* fileops: replace integer usage with more explicit enum in some ↵nulltoken2012-05-081-3/+3
| | | | git_futils_rmdir_r() calls
* repository: ensure git_repository_open() returns ENOTFOUND when being passed ↵nulltoken2012-05-081-0/+6
| | | | a path leading to no repository
* Fix warnings on 64-bit windows buildsRussell Belfer2012-04-171-1/+1
| | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* tests-clar/repo: fix unused warningschu2012-04-151-0/+2
| | | | | | | ifdef GIT_WIN32 helper unposix_path() to avoid unused-function warning on non-Windows systems. Signed-off-by: schu <schu-github@schulog.org>
* Refactor git_repository_open with new optionsRussell Belfer2012-04-111-11/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command `git_repository_open_ext` with extended options that control how searching for a repository will be done. The existing `git_repository_open` and `git_repository_discover` are reimplemented on top of it. We may want to change the default behavior of `git_repository_open` but this commit does not do that. Improve support for "gitdir" files where the work dir is separate from the repo and support for the "separate-git-dir" config. Also, add support for opening repos created with `git-new-workdir` script (although I have only confirmed that they can be opened, not that all functions work correctly). There are also a few minor changes that came up: - Fix `git_path_prettify` to allow in-place prettifying. - Fix `git_path_root` to support backslashes on Win32. This fix should help many repo open/discover scenarios - it is the one function called when opening before prettifying the path. - Tweak `git_config_get_string` to set the "out" pointer to NULL if the config value is not found. Allows some other cleanup. - Fix a couple places that should have been calling `git_repository_config__weakptr` and were not. - Fix `cl_git_sandbox_init` clar helper to support bare repos.
* repository: ensure that the path to the .git directory ends with a forward ↵nulltoken2012-02-031-7/+29
| | | | | | | | slash when opening a repository through a working directory path This fixes an issue which was detected while using one of the libgit2 bindings [0]. The lack of the trailing forward slash led the name of references returned by git_reference_listall() to be prefixed with a forward slash. [0]: https://github.com/libgit2/libgit2sharp/pull/108
* clay: migrate a test initializing a repository which path escapes the ↵nulltoken2012-01-251-31/+0
| | | | | | current working directory A non migrated yet test has been removed as well as it's mostly redundant.
* Rename the Clay test suite to ClarVicent Martí2012-01-241-0/+55
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!