summaryrefslogtreecommitdiff
path: root/tests-clar/repo/init.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename tests-clar to testsBen Straub2013-11-141-606/+0
|
* iconv: Do not fake an API when iconv is not availableVicent Marti2013-11-011-1/+1
|
* More cleanups to remove WIN assumptionsRussell Belfer2013-10-031-14/+3
| | | | | This cleans up more of the test suite to check actual filesystem behavior instead of relying on Windows vs. Mac vs. Linux to test.
* Update repo init with fewer platform assumptionsRussell Belfer2013-10-031-44/+48
| | | | | | | | | | | | | | The repo init code was assuming Windows == no filemode, and Mac or Windows == no case sensitivity. Those assumptions are not consistently true depending on the mounted file system. This is a first step to removing those assumptions. It focuses on the repo init code and the tests of that code. There are still many other tests that are broken when those assumptions don't hold true, but this clears up one area of the code. Also, this moves the core.precomposeunicode logic to be closer to the current logic in core Git where it will be set to true on any filesystem where composed unicode is decomposed when read back.
* Add check if we need to precompose unicode on MacRussell Belfer2013-10-031-0/+10
| | | | | | | | | | | | This adds initialization of core.precomposeunicode to repo init on Mac. This is necessary because when a Mac accesses a repo on a VFAT or SAMBA file system, it will return directory entries in decomposed unicode even if the filesystem entry is precomposed. This also removes caching of a number of repo properties from the repo init pipeline because these are properties of the specific filesystem on which the repo is created, not of the system as a whole.
* Fix warnings on Windows 64-bit buildRussell Belfer2013-09-231-1/+1
|
* Add clar helper to create new commit from indexRussell Belfer2013-09-171-0/+5
| | | | | | | | There were a lot of places in the test code base that were creating a commit from the index on the current branch. This just adds a helper to handle that case pretty easily. There was only one test where this change ended up tweaking the test data, so pretty easy and mostly just a cleanup.
* Better macro name for is-exec-bit-set testRussell Belfer2013-09-051-1/+1
|
* GIT_MODE_TYPE should exclude setgid bitsRussell Belfer2013-09-051-6/+2
| | | | | | | | | The GIT_MODE_TYPE macro was looking at all bits above the permissions, but it should really just look at the top bits so that it will give the right results for a setgid or setuid entry. Since we're now using these macros in the tests, this was causing a test failure on platforms that don't support setgid.
* Fix tests of file modesRussell Belfer2013-09-051-15/+18
| | | | | | | This fixes an issue checking file modes in the tests that initialize a repo from a template directory when a symlink is used in the template. Also, this updates some other places where we are examining file modes to use the new macros.
* Fix tests to use core.filemode correctlyRussell Belfer2013-09-041-13/+9
| | | | Some windows tests were failing
* _umask is function name on WindowsRussell Belfer2013-09-041-5/+5
|
* Make tests take umask into accountRussell Belfer2013-09-041-2/+13
| | | | | | | | It seems that libgit2 is correctly applying the umask when initializing a repository from a template and when creating new directories during checkout, but the test suite is not accounting for possible variations due to the umask. This updates that so that the test suite will work regardless of the umask.
* Improve isolation of new test from user environsRussell Belfer2013-08-161-0/+11
|
* New test that inits repo and make commitRussell Belfer2013-08-161-0/+49
|
* Add cl_repo_set_bool and cleanup testsRussell Belfer2013-03-221-4/+2
| | | | | | This adds a helper function for the cases where you want to quickly set a single boolean config value for a repository. This allowed me to remove a lot of code.
* Make mode handling during init more like gitRussell Belfer2013-02-271-34/+39
| | | | | | | | | | | When creating files, instead of actually using GIT_FILEMODE_BLOB and the other various constants that happen to correspond to mode values, apparently I should be just using 0666 and 0777, and relying on the umask to clear bits and make the value sane. This fixes the rules for copying a template directory and fixes the checks to match that new behavior. (Further changes to the checkout logic to follow separately.)
* Fix portability issues on WindowsRussell Belfer2013-02-261-8/+31
| | | | | | The new tests were not taking core.filemode into account when testing file modes after repo initialization. Fixed that and some other Windows warnings that have crept in.
* Fix initialization of repo directoriesRussell Belfer2013-02-261-8/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | When PR #1359 removed the hooks from the test resources/template directory, it made me realize that the tests for git_repository_init_ext using templates must be pretty shabby because we could not have been testing if the hooks were getting created correctly. So, this started with me recreating a couple of hooks, including a sample and symlink, and adding tests that they got created correctly in the various circumstances, including with the SHARED modes, etc. Unfortunately this uncovered some issues with how directories and symlinks were copied and chmod'ed. Also, there was a FIXME in the code related to the chmod behavior as well. Going back over the directory creation logic for setting up a repository, I found it was a little difficult to read and could result in creating and/or chmod'ing directories that the user almost certainly didn't intend. So that let to this work which makes repo initialization much more careful (and hopefully easier to follow). It required a couple of extensions / changes to core fileops utilities, but I also think those are for the better, at least for git_futils_cp_r in terms of being careful about what actions it takes.
* tests: fix indentation in repo/init.cScott J. Goldman2013-02-071-20/+20
|
* Now checks in the template test whether the description file hasSebastian Bauer2013-01-131-0/+11
| | | | | | | been properly copied. This is a minimal effort to test whether the template really has been used when creating an repo with external templates.
* Added flag GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE to ↵Sebastian Bauer2013-01-121-1/+1
| | | | | | | test_repo_init__extended_with_template(). Otherwise the template functionallity is not tested (as a TODO we also shall test that the specified template really got copied).
* Deploy GIT_REPOSITORY_INIT_OPTIONS_INITBen Straub2012-11-301-6/+3
|
* Rename ref and reflog apis for consistencyBen Straub2012-11-271-1/+1
|
* Reset all static variables to NULL in clar's __cleanupSascha Cunz2012-11-231-0/+2
| | | | | | | | | | | | Without this change, any failed assertion in the second (or a later) test inside a test suite has a chance of double deleting memory, resulting in a heap corruption. See #1096 for details. This leaves alone the test cases where we "just" use cl_git_sandbox_init() and cl_git_sandbox_cleanup(). These methods already take good care to not double delete a repository. Fixes #1096
* repository: make initialization cope with missing core.worktreenulltoken2012-08-291-0/+15
|
* Fix errors on Win32 with new repo initRussell Belfer2012-08-241-1/+4
|
* Add template dir and set gid to repo initRussell Belfer2012-08-221-1/+81
| | | | | | | | | | | | | | | | | This extends git_repository_init_ext further with support for initializing the repository from an external template directory and with support for the "create shared" type flags that make a set GID repository directory. This also adds tests for much of the new functionality to the existing `repo/init.c` test suite. Also, this adds a bunch of new utility functions including a very general purpose `git_futils_mkdir` (with the ability to make paths and to chmod the paths post-creation) and a file tree copying function `git_futils_cp_r`. Also, this includes some new path functions that were useful to keep the code simple.
* repo tests: do cleanup reinit testsCarlos Martín Nieto2012-07-031-0/+5
|
* tests-clar: fix isolation of repo initialization testsnulltoken2012-06-221-6/+17
|
* repository: enhance reinitialization test coveragenulltoken2012-06-221-0/+31
|
* tests: plug a leak in the repo testsCarlos Martín Nieto2012-06-211-0/+1
| | | | | | The second call to assert_config_entry_on_init_bytype is cleaned up by the main cleanup function, but that overwrites the first _repo. Make sure that one doesn't leak.
* repository: make git_repository_init() value the core.logallrefupdates ↵nulltoken2012-06-121-0/+6
| | | | config entry
* repository: widen test coverage regarding initialization and configuration ↵nulltoken2012-06-121-2/+10
| | | | entries
* repository: make git_repository_init() value the core.ignorecase config entrynulltoken2012-06-051-7/+54
|
* repository: make git_repository_init() value the core.filemode config entrynulltoken2012-06-051-0/+21
|
* Fixed leaks and added testsRussell Belfer2012-05-111-0/+24
|
* repository: add minimal reinitialization of repositorynulltoken2012-01-251-0/+36
| | | | This currently only ensures that the version of the repository format isn't greater than zero.
* clay: migrate a test initializing a repository which path escapes the ↵nulltoken2012-01-251-20/+21
| | | | | | 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/+106
Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!