tests-clar/repo/init.c


Log

Author Commit Date CI Message
Russell Belfer 6b7991e2 2013-09-30T16:13:53 Add check if we need to precompose unicode on Mac 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.
Russell Belfer 71379313 2013-09-23T13:40:23 Fix warnings on Windows 64-bit build
Russell Belfer 155fa234 2013-09-05T15:06:42 Add clar helper to create new commit from index 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.
Russell Belfer a7fcc44d 2013-09-05T16:14:32 Better macro name for is-exec-bit-set test
Russell Belfer af22dabb 2013-09-05T12:01:17 GIT_MODE_TYPE should exclude setgid bits 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.
Russell Belfer c97d407d 2013-09-05T11:45:29 Fix tests of file modes 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.
Russell Belfer 9ce4f7da 2013-09-04T16:41:34 Fix tests to use core.filemode correctly Some windows tests were failing
Russell Belfer 2a54c7f4 2013-09-04T16:24:36 _umask is function name on Windows
Russell Belfer 780f3e54 2013-09-04T16:13:18 Make tests take umask into account 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.
Russell Belfer 0ea41445 2013-08-16T15:03:15 Improve isolation of new test from user environs
Russell Belfer 579d87c5 2013-08-16T14:48:14 New test that inits repo and make commit
Russell Belfer 1323c6d1 2013-03-22T14:27:56 Add cl_repo_set_bool and cleanup tests 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.
Russell Belfer 18f08264 2013-02-27T13:44:15 Make mode handling during init more like git 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.)
Russell Belfer 0d1b094b 2013-02-26T13:15:06 Fix portability issues on Windows 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.
Russell Belfer 3c42e4ef 2013-02-26T11:43:14 Fix initialization of repo directories 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.
Scott J. Goldman f7b06018 2013-02-07T03:04:50 tests: fix indentation in repo/init.c
Sebastian Bauer 5885ba11 2013-01-13T12:23:30 Now checks in the template test whether the description file has been properly copied. This is a minimal effort to test whether the template really has been used when creating an repo with external templates.
Sebastian Bauer 4a4aee11 2013-01-12T18:44:50 Added flag GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE to 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).
Ben Straub b4d13652 2012-11-29T20:06:23 Deploy GIT_REPOSITORY_INIT_OPTIONS_INIT
Ben Straub 2508cc66 2012-11-18T21:38:08 Rename ref and reflog apis for consistency
Sascha Cunz 9094d30b 2012-11-23T11:41:56 Reset all static variables to NULL in clar's __cleanup 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
nulltoken 89cd5708 2012-08-29T14:20:53 repository: make initialization cope with missing core.worktree
Russell Belfer 2eb4edf5 2012-08-24T10:48:48 Fix errors on Win32 with new repo init
Russell Belfer ca1b6e54 2012-07-31T17:02:54 Add template dir and set gid to repo init 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.
Carlos Martín Nieto 973ed4c9 2012-07-03T12:11:19 repo tests: do cleanup reinit tests
nulltoken d6d8cc27 2012-06-22T13:41:26 tests-clar: fix isolation of repo initialization tests
nulltoken dbb24a39 2012-06-22T11:30:43 repository: enhance reinitialization test coverage
Carlos Martín Nieto 9311423c 2012-06-21T02:30:30 tests: plug a leak in the repo tests 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.
nulltoken 7623b1b6 2012-06-11T11:33:13 repository: make git_repository_init() value the core.logallrefupdates config entry
nulltoken 976b69bd 2012-06-11T11:06:53 repository: widen test coverage regarding initialization and configuration entries
nulltoken 693b23c0 2012-06-05T14:29:10 repository: make git_repository_init() value the core.ignorecase config entry
nulltoken fac66990 2012-06-05T13:56:44 repository: make git_repository_init() value the core.filemode config entry
Russell Belfer db628072 2012-05-11T12:16:19 Fixed leaks and added tests
nulltoken 5663e61a 2012-01-25T16:44:21 repository: add minimal reinitialization of repository This currently only ensures that the version of the repository format isn't greater than zero.
nulltoken 9b84447a 2012-01-25T12:35:25 clay: migrate a test initializing a repository which path escapes the current working directory A non migrated yet test has been removed as well as it's mostly redundant.
Vicent Martí 3fd1520c 2012-01-24T20:35:15 Rename the Clay test suite to Clar Clay is the name of a programming language on the makings, and we want to avoid confusions. Sorry for the huge diff!