tests-clay


Log

Author Commit Date CI Message
Russell Belfer 948431aa 2012-01-05T15:00:46 Remove repo open immediately after init in test Calling git_repository_open immediately after git_repository_init results in memory leaks.
Vicent Martí f2114d0a 2012-01-04T22:40:59 Merge remote-tracking branch 'nulltoken/topix/path_fromurl' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
nulltoken acb159e1 2012-01-04T17:59:48 Fix MSVC compilation warnings
Vicent Martí 1d415455 2012-01-02T10:06:24 clay: Move `file_create` to the helpers file
Vicent Martí 7a704309 2012-01-02T09:58:39 Merge remote-tracking branch 'drizzd/diff-index-tests' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Martí 9191a6d2 2012-01-02T09:56:48 Merge remote-tracking branch 'arrbee/git-attributes' into development Conflicts: tests-clay/clay_main.c
Russell Belfer bd370b14 2011-12-30T15:00:14 Improved gitattributes macro implementation This updates to implementation of gitattribute macros to be much more similar to core git (albeit not 100%) and to handle expansion of macros within macros, etc. It also cleans up the refcounting usage with macros to be much cleaner. Also, this adds a new vector function `git_vector_insert_sorted()` which allows you to maintain a sorted list as you go. In order to write that function, this changes the function `git__bsearch()` to take a somewhat different set of parameters, although the core functionality is still the same.
Clemens Buchacher ee3f96d4 2011-12-29T15:06:36 clay: reset expect_idx in diff_more test For the diff-index tests, the diff_more test will run multiple times. Reset the expect_idx counter after each test in order to allow this.
Clemens Buchacher 599f2849 2011-12-26T18:37:31 add git_index_read_tree
Clemens Buchacher 0fb3fba1 2011-12-29T10:37:28 add diff-index tests
Clemens Buchacher 86a459a8 2011-12-29T12:16:01 cmake: generate clay main The clay test suite files clay.h and clay_main.c are generated by the clay python script. Teach CMake about this dependency and remove the generated files from the repository.
Russell Belfer 73b51450 2011-12-28T23:28:50 Add support for macros and cache flush API. Add support for git attribute macro definitions. Also, add support for cache flush API to clear the attribute file content cache when needed. Additionally, improved the handling of global and system files, making common utility functions in fileops and converting config and attr to both use the common functions. Adds a bunch more tests and fixed some memory leaks. Note that adding macros required me to use refcounted attribute assignment definitions, which complicated, but probably improved memory usage.
nulltoken e2580375 2011-12-28T11:36:18 transport: make local transport accept a file Uri containing percent-encoded characters This makes libgit2 compliant with the following scenario $ git ls-remote file:///d:/temp/dwm%20tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master $ mv "/d/temp/dwm tinou" /d/temp/dwm+tinou $ git ls-remote file:///d:/temp/dwm%20tinou fatal: 'd:/temp/dwm tinou' does not appear to be a git repository fatal: The remote end hung up unexpectedly $ git ls-remote file:///d:/temp/dwm+tinou 732d790b702db4b8985f5104fc44642654f6a6b6 HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/heads/master 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/HEAD 732d790b702db4b8985f5104fc44642654f6a6b6 refs/remotes/origin/master
nulltoken 2017a15d 2011-12-27T16:03:28 path: add git_path_fromurl()
nulltoken 459e2dcd 2011-12-27T11:18:57 path: add git__percent_decode()
nulltoken eb8de747 2011-12-28T20:24:58 util: add git__fromhex()
Vicent Martí d16e4b2b 2011-12-25T00:25:04 remotes: Remove unused variables
Vicent Martí fa515656 2011-12-25T00:22:20 refs: Fix double free Includes relevant Clay test
nulltoken db1f7e59 2011-12-21T16:36:34 remote: add test to retrieve the advertised references from a local repository and fix related implementation
Russell Belfer ee1f0b1a 2011-12-16T10:56:43 Add APIs for git attributes This adds APIs for querying git attributes. In addition to the new API in include/git2/attr.h, most of the action is in src/attr_file.[hc] which contains utilities for dealing with a single attributes file, and src/attr.[hc] which contains the implementation of the APIs that merge all applicable attributes files.
Russell Belfer be00b00d 2011-12-18T12:21:18 Add unit test for proper init of index entries
Vicent Marti bc57b80b 2011-12-15T02:08:03 Update to Clay 0.10.0 Comes with support for global events; this fixes #496.
Russell Belfer b5daae68 2011-12-14T12:34:43 Allow git_buf_joinpath to accept self-joins It was not safe for git_buf_joinpath to be used with a pointer into the buf itself because a reallocation could invalidate the input parameter that pointed into the buffer. This patch makes it safe to self join, at least for the leading input to the join, which is the common "append" case for self joins. Also added unit tests to explicitly cover this case. This should actually fix #511
nulltoken 8fae76c5 2011-12-14T09:38:05 commit: add test to ensure predictability of generation of commit, tree and blob object ids
Vicent Marti 16a9f32a 2011-12-14T03:32:49 Merge remote-tracking branch 'nulltoken/topic/oid-generation' into development Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Marti 40e73d6f 2011-12-09T01:38:46 Merge remote-tracking branch 'arrbee/git-buf-for-paths' into development Conflicts: tests-clay/clay_main.c
Russell Belfer 97769280 2011-11-30T11:27:15 Use git_buf for path storage instead of stack-based buffers This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
nulltoken a7954d2a 2011-12-04T17:55:35 tree: add test to ensure predictability of generation of object ids
Carlos Martín Nieto b4d757c0 2011-10-26T15:19:49 clay: add tests for tree diff'ing Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: Vicent Marti <tanoku@gmail.com>
nulltoken 8e80decf 2011-12-01T07:48:20 Fix compilation warnings
Russell Belfer 969d588d 2011-11-30T13:10:47 Optimized of git_buf_join. This streamlines git_buf_join and removes the join-append behavior, opting instead for a very compact join-replace of the git_buf contents. The unit tests had to be updated to remove the join-append tests and have a bunch more exhaustive tests added.
Russell Belfer 309113c9 2011-11-29T23:45:17 Make initial value of git_buf ptr always be a valid empty string. Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c.
Russell Belfer 7df41387 2011-11-29T21:44:54 Adding unit tests for git_buf_copy_cstr
Russell Belfer c63728cd 2011-11-29T16:39:49 Make git_buf functions always maintain a valid cstr. At a tiny cost of 1 extra byte per allocation, this makes git_buf_cstr into basically a noop, which simplifies error checking when trying to convert things to use dynamic allocation. This patch also adds a new function (git_buf_copy_cstr) for copying the cstr data directly into an external buffer.
Vicent Marti 8e46168c 2011-11-29T11:36:18 clay: Add buffer tests
schu 91a9a070 2011-11-29T11:03:06 tests-clay: mix the tests Actually add the tests introduced with 8c74d22. Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí 798dd36c 2011-11-29T01:39:52 Merge pull request #499 from arrbee/extend-git-buf Extend git_buf with new utility functions and unit tests.
Russell Belfer 679b69c4 2011-11-28T13:05:25 Resolve remaining feedback * replace some ints with size_ts * update NULL checks in various places
Carlos Martín Nieto 89886d0b 2011-11-28T21:08:29 Plug a bunch of leaks
Russell Belfer 3aa294fd 2011-11-28T10:42:57 Add two string git_buf_join and tweak input error checking. This commit addresses two of the comments: * renamed existing n-input git_buf_join to git_buf_join_n * added new git_buf_join that always takes two inputs * moved some parameter error checking to asserts * extended unit tests to cover new version of git_buf_join
Russell Belfer 8c74d22e 2011-11-27T21:47:58 Extend git_buf with new utility functions and unit tests. Add new functions to git_buf for: * initializing a buffer from a string * joining one or more strings onto a buffer with separators * swapping two buffers in place * extracting data from a git_buf (leaving it empty) Also, make git_buf_free leave a git_buf back in its initted state, and slightly tweak buffer allocation sizes and thresholds. Finally, port unit tests to clay and extend with lots of new tests for the various git_buf functions.
Vicent Marti 45e79e37 2011-11-26T04:59:21 Rename all `_close` methods There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
Vicent Marti 9462c471 2011-11-25T08:16:26 repository: Change ownership semantics 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.
Carlos Martín Nieto 533fda3b 2011-11-26T02:00:18 config: test saving config to new file
Brandon Casey b026b00d 2011-11-21T22:47:59 tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.c
Vicent Marti bf038dab 2011-11-22T02:06:24 clay: Properly initialize filebuf
Russell Belfer b762e576 2011-11-17T15:10:27 filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups 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>
Vicent Marti 1d09a1c8 2011-11-22T01:41:22 clay: Merge manually @leto's tests from #485 This uses the new Clay code. As you can see, the diff is minimal... It works!
Carlos Martín Nieto e4c93a39 2011-11-18T02:26:10 Update clay instructions to use -vtap
Carlos Martín Nieto c515b5bf 2011-11-18T02:16:24 Add test for renaming a file and adding it to the index Thanks to Emeric.
Vicent Marti d1a721c5 2011-11-17T06:01:09 clay: Bump to 0.9.0, add TAP support Comes with schu's stress tests for config files. Hopefully the diffs will stay minimal from now on.
Vicent Marti 9432af36 2011-11-17T01:23:19 Rename `git_tree_frompath` to `git_tree_get_subtree` That makes more sense to me.
Jonathan "Duke" Leto 7b615610 2011-11-16T10:22:13 Fix docs about the command to mix the clay tests
Carlos Martín Nieto 0c49ec2d 2011-11-07T19:34:24 Implement p_rename Move the callers of git_futils_mv_atomic to use p_rename. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí 89fb8f02 2011-10-28T19:04:23 Merge pull request #456 from brodie/perm-fixes Create objects, indexes, and directories with the right file permissions
Vicent Marti 3286c408 2011-10-28T14:51:13 global: Properly use `git__` memory wrappers Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
schu 9ff46db9 2011-10-19T13:48:51 tests-clay: move t01-rawobj.c to clay Signed-off-by: schu <schu-github@schulog.org>
Brodie Rao 01ad7b3a 2011-09-06T15:48:45 *: correct and codify various file permissions 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".
Brodie Rao ce8cd006 2011-09-07T15:32:44 fileops/repository: create (most) directories with 0777 permissions 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.
nulltoken 3fa735ca 2011-10-13T23:17:19 tree: Add git_tree_frompath() which, given a relative path to a tree entry, retrieves the tree object containing this tree entry
nulltoken 34aff010 2011-10-12T14:06:23 oid: Add git_oid_streq() which checks if an oid and an hex formatted string are equal
schu 1d33bf9d 2011-10-07T22:57:44 tests-clay: add a readme file Signed-off-by: schu <schu-github@schulog.org>
schu 681008c7 2011-10-07T22:31:08 tests-clay: update clay 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>
Vicent Marti dfd0abda 2011-10-01T13:25:24 clay: Fix compilation under MSVC
Vicent Marti d02a7d83 2011-09-28T18:57:32 Update Clay
Carlos Martín Nieto 40fe5fbe 2011-09-22T22:50:36 Make repo config loading automatic or completely explicit 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>
Paul Betts 76c15b71 2011-09-22T12:26:23 Revert changes to clay
Paul Betts e1b86444 2011-09-21T11:17:30 Rewrite getenv to use Win32 version on Windows
Vicent Marti a5888127 2011-09-21T01:14:57 Fix clay under MinGW
Vicent Marti 468d0d1e 2011-09-19T06:32:56 Fix `repository_config` call in network::remotes
Carlos Martín Nieto 3a2626f3 2011-09-13T01:13:41 Add remotes test to clay Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti 2014021b 2011-09-19T05:41:00 Backport t18 fixes to Clay
Vicent Marti 87d9869f 2011-09-19T03:34:49 Tabify everything 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.
Vicent Marti 934fa904 2011-09-16T19:48:57 Update Clay script
Vicent Marti df297a1f 2011-09-16T19:42:44 Fix Clay compilation under Win32
Vicent Marti fe4aa206 2011-09-16T05:47:18 Regenerate test suite
Vicent Marti a5f8c1bd 2011-09-16T05:46:18 Add missing prototypes
Vicent Marti 11385c3c 2011-09-16T05:12:56 Add sample "Status" clay tests
Vicent Marti f1558d9b 2011-09-15T01:12:46 Come out and Clay