summaryrefslogtreecommitdiff
path: root/tests-clay
Commit message (Collapse)AuthorAgeFilesLines
...
* | Plug a bunch of leaksCarlos Martín Nieto2011-11-281-0/+2
| |
* | Rename all `_close` methodsVicent Marti2011-11-263-6/+7
| | | | | | | | | | There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
* | repository: Change ownership semanticsVicent Marti2011-11-2616-35/+1633
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ownership semantics have been changed all over the library to be consistent. There are no more "borrowed" or duplicated references. Main changes: - `git_repository_open2` and `3` have been dropped. - Added setters and getters to hotswap all the repository owned objects: `git_repository_index` `git_repository_set_index` `git_repository_odb` `git_repository_set_odb` `git_repository_config` `git_repository_set_config` `git_repository_workdir` `git_repository_set_workdir` Now working directories/index files/ODBs and so on can be hot-swapped after creating a repository and between operations. - All these objects now have proper ownership semantics with refcounting: they all require freeing after they are no longer needed (the repository always keeps its internal reference). - Repository open and initialization has been updated to keep in mind the configuration files. Bare repositories are now always detected, and a default config file is created on init. - All the tests affected by these changes have been dropped from the old test suite and ported to the new one.
* config: test saving config to new fileCarlos Martín Nieto2011-11-263-2/+48
|
* tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.cBrandon Casey2011-11-222-2/+2
|
* clay: Properly initialize filebufVicent Marti2011-11-221-1/+1
|
* filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanupsRussell Belfer2011-11-223-6/+60
| | | | | | | | Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT and make git_filebuf_open and git_filebuf_cleanup safe to be called multiple times on the same buffer. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* clay: Merge manually @leto's tests from #485Vicent Marti2011-11-223-2/+43
| | | | | This uses the new Clay code. As you can see, the diff is minimal... It works!
* Update clay instructions to use -vtapCarlos Martín Nieto2011-11-181-1/+1
|
* Add test for renaming a file and adding it to the indexCarlos Martín Nieto2011-11-183-2/+72
| | | | Thanks to Emeric.
* clay: Bump to 0.9.0, add TAP supportVicent Marti2011-11-185-378/+565
| | | | | Comes with schu's stress tests for config files. Hopefully the diffs will stay minimal from now on.
* Rename `git_tree_frompath` to `git_tree_get_subtree`Vicent Marti2011-11-181-1/+1
| | | | That makes more sense to me.
* Fix docs about the command to mix the clay testsJonathan "Duke" Leto2011-11-161-1/+1
|
* Implement p_renameCarlos Martín Nieto2011-11-071-1/+1
| | | | | | Move the callers of git_futils_mv_atomic to use p_rename. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Merge pull request #456 from brodie/perm-fixesVicent Martí2011-10-284-14/+14
|\ | | | | Create objects, indexes, and directories with the right file permissions
| * *: correct and codify various file permissionsBrodie Rao2011-10-144-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files now have 0444 permissions: - loose objects - pack indexes - pack files - packs downloaded by fetch - packs downloaded by the HTTP transport And the following files now have 0666 permissions: - config files - repository indexes - reflogs - refs This brings libgit2 more in line with Git. Note that git_filebuf_commit() and git_filebuf_commit_at() have both gained a new mode parameter. The latter change fixes an important issue where filebufs created with GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3) usage). Now we chmod() the file before renaming it into place. Tests have been added to confirm that new commit, tag, and tree objects are created with the right permissions. I don't have access to Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
| * fileops/repository: create (most) directories with 0777 permissionsBrodie Rao2011-10-142-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To further match how Git behaves, this change makes most of the directories libgit2 creates in a git repo have a file mode of 0777. Specifically: - Intermediate directories created with git_futils_mkpath2file() have 0777 permissions. This affects odb_loose, reflog, and refs. - The top level folder for bare repos is created with 0777 permissions. - The top level folder for non-bare repos is created with 0755 permissions. - /objects/info/, /objects/pack/, /refs/heads/, and /refs/tags/ are created with 0777 permissions. Additionally, the following changes have been made: - fileops functions that create intermediate directories have grown a new dirmode parameter. The only exception to this is filebuf's lock_file(), which unconditionally creates intermediate directories with 0777 permissions when GIT_FILEBUF_FORCE is set. - The test runner now sets the umask to 0 before running any tests. This ensurses all file mode checks are consistent across systems. - t09-tree.c now does a directory permissions check. I've avoided adding this check to other tests that might reuse existing directories from the prefabricated test repos. Because they're checked into the repo, they have 0755 permissions. - Other assorted directories created by tests have 0777 permissions.
* | global: Properly use `git__` memory wrappersVicent Marti2011-10-284-6/+6
| | | | | | | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* | tests-clay: move t01-rawobj.c to clayschu2011-10-2411-71/+1106
|/ | | | Signed-off-by: schu <schu-github@schulog.org>
* tree: Add git_tree_frompath() which, given a relative path to a tree entry, ↵nulltoken2011-10-133-10/+100
| | | | retrieves the tree object containing this tree entry
* oid: Add git_oid_streq() which checks if an oid and an hex formatted string ↵nulltoken2011-10-133-68/+95
| | | | are equal
* tests-clay: add a readme fileschu2011-10-071-0/+26
| | | | Signed-off-by: schu <schu-github@schulog.org>
* tests-clay: update clayschu2011-10-074-66/+113
| | | | | | | | The clay script didn't match the latest version from upstream. Additionaly, add core/strtol.c to complete porting the core tests to clay. Signed-off-by: schu <schu-github@schulog.org>
* clay: Fix compilation under MSVCVicent Marti2011-10-011-7/+9
|
* Update ClayVicent Marti2011-09-283-116/+84
|
* Make repo config loading automatic or completely explicitCarlos Martín Nieto2011-09-271-1/+1
| | | | | | | | | | | git_repository_config wants to take the global and system paths again so that one can be explicit if needed. The git_repository_config_autoload function is provided for the cases when it's good enough for the library to guess where those files are located. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Revert changes to clayPaul Betts2011-09-221-4/+1
|
* Rewrite getenv to use Win32 version on WindowsPaul Betts2011-09-211-1/+4
|
* Fix clay under MinGWVicent Marti2011-09-211-35/+43
|
* Fix `repository_config` call in network::remotesVicent Marti2011-09-191-1/+1
|
* Add remotes test to clayCarlos Martín Nieto2011-09-192-24/+86
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Backport t18 fixes to ClayVicent Marti2011-09-191-2/+4
|
* Tabify everythingVicent Marti2011-09-193-76/+76
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* Update Clay scriptVicent Marti2011-09-161-3/+3
|
* Fix Clay compilation under Win32Vicent Marti2011-09-163-12/+23
|
* Regenerate test suiteVicent Marti2011-09-161-4/+4
|
* Add missing prototypesVicent Marti2011-09-162-6/+6
|
* Add sample "Status" clay testsVicent Marti2011-09-166-52/+506
|
* Come out and ClayVicent Marti2011-09-1510-0/+1399