tests-clar/repo/init.c


Log

Author Commit Date CI Message
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 976b69bd 2012-06-11T11:06:53 repository: widen test coverage regarding initialization and configuration entries
nulltoken 7623b1b6 2012-06-11T11:33:13 repository: make git_repository_init() value the core.logallrefupdates config entry
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!