tests/repo


Log

Author Commit Date CI Message
Carlos Martín Nieto a5815a2a 2015-03-07T00:30:40 Add tests for the annotated versions of ref-modifying functions This also brings the soft-reset tests back to life. The function name was missing an underscore, meaning they had not been running.
Edward Thomson 70c735e1 2015-03-10T16:49:24 repository_new: test its bareness
Carlos Martín Nieto 9a97f49e 2014-12-21T15:31:03 config: borrow refcounted references This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
Carlos Martín Nieto 4e498646 2015-01-15T16:50:31 repository: remove log message override for switching the active branch We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Edward Thomson feb0e022 2015-02-19T12:14:06 tests: separate INVASIVE filesystem tests Introduce GITTEST_INVASIVE_FS_STRUCTURE for things that are invasive to your filesystem structure (like creating folders at your filesystem root) and GITTEST_INVASIVE_FS_SIZE for things that write lots of data.
Carlos Martín Nieto d24a5312 2015-02-12T02:34:58 Merge pull request #2866 from ethomson/checkout_perf2 Checkout performance
Edward Thomson 865baaf9 2015-02-05T11:06:01 repo: ensure we can create repo at filesystem root Test to ensure that we can create a repository at the filesystem root. Introduces a new test environment variable, `GITTEST_INVASIVE_FILESYSTEM` for tests that do terrible things like escaping the clar sandbox and writing to the root directory. It is expected that the CI builds will enable this but that normal people would not want this.
Edward Thomson 60561d54 2015-02-03T03:36:07 tests: update for new test data
Edward Thomson 3b40ed89 2015-01-08T19:23:37 repo::init test: create hook symlink Remove the hook symlink from the test resources, so that we can have a source tree that is easy to zip up and copy around on systems that don't support symlinks. Create it dynamically at test execution instead.
Carlos Martín Nieto 208a2c8a 2014-12-27T12:09:11 treebuilder: rename _create() to _new() This function is a constructor, so let's name it like one and leave _create() for the reference functions, which do create/write the reference.
Edward Thomson dce7b1a4 2014-12-16T19:24:04 treebuilder: take a repository for path validation Path validation may be influenced by `core.protectHFS` and `core.protectNTFS` configuration settings, thus treebuilders can take a repository to influence their configuration.
Carlos Martín Nieto 209425ce 2014-11-08T13:25:51 remote: rename _load() to _lookup() This brings it in line with the rest of the lookup functions.
Carlos Martín Nieto 62a617dc 2014-11-06T16:16:46 iterator: submodules are determined by an index or tree We cannot know from looking at .gitmodules whether a directory is a submodule or not. We need the index or tree we are comparing against to tell us. Otherwise we have to assume the entry in .gitmodules is stale or otherwise invalid. Thus we pass the index of the repository into the workdir iterator, even if we do not want to compare against it. This follows what git does, which even for `git diff <tree>`, it will consider staged submodules as such.
Carlos Martín Nieto 25abbc27 2014-09-17T03:19:40 Clean up some leaks in the test suite
Jameson Miller bc737620 2014-08-20T10:24:41 Introduce option to use relative paths for repository work directory Teach git_repository_init_ext to use relative paths for the gitlink to the work directory. This is used when creating a sub repository where the sub repository resides in the parent repository's .git directory.
Russell Belfer f18234fa 2014-08-08T13:17:50 Don't report status on named pipes Git skips entries in directories that are not S_ISDIR, S_ISREG, or S_ISLNK, so let's make libgit2 do the same thing.
Edward Thomson 0ba4dca5 2014-07-22T10:40:23 git_cherry_pick -> git_cherrypick
Edward Thomson 0cee70eb 2014-07-01T14:09:01 Introduce cl_assert_equal_oid
Cha, Hojeong 3ac1ff42 2014-05-27T23:32:38 Fix compile error on Visual Studio
Russell Belfer 8487e237 2014-05-15T10:56:28 Better search path sandboxing There are a number of tests that modify the global or system search paths during the tests. This adds a helper function to make it easier to restore those paths and makes sure that they are getting restored in a manner that preserves test isolation.
Jacques Germishuys efaa342c 2014-04-11T22:07:49 Correct C90 warnings
Jacques Germishuys c0311295 2014-04-07T17:32:23 git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ and BISECT_LOG
Carlos Martín Nieto 99797c96 2014-03-19T18:14:35 reflog: handle symref chains Given HEAD -> master -> foo, when updating foo's reflog we should also update HEAD's, as it's considered the current branch.
Carlos Martín Nieto 6aaae94a 2014-03-19T16:30:37 reflog: handle the birth of a branch The reflog append function was overzealous in its checking. When passed an old and new ids, it should not do any checking, but just serialize the data to a reflog entry.
Carlos Martín Nieto 1afe1400 2014-03-18T22:16:58 refdb: don't update when there's no need If the caller wants to update a ref to point to the same target as it currently has, we should return early and avoid writing to the reflog.
Carlos Martín Nieto bac95e6e 2014-03-18T19:41:03 reflog: more comprehensive HEAD tests The existing ones lack checking zeroed ids when switching back from an unborn branch as well as what happens when detaching. The reflog appending function mistakenly wrote zeros when dealing with a detached HEAD. This explicitly checks for those situations and fixes them.
Carlos Martín Nieto 4b7e1b9e 2014-01-15T13:19:48 refs: append to the HEAD reflog when updating the current branch When we update the current branch, we must also append to HEAD's reflog to keep them in sync. This is a bit of a hack, but as git.git says, it covers 100% of default cases.
Carlos Martín Nieto cb562c3f 2014-03-17T17:36:51 repo: remove test which deletes HEAD This is not something anybody would ever do; removing HEAD makes the .git/ directory no longer be a repository, so we wouldn't be expected to handle such a situation.
Edward Thomson 83634d38 2014-02-24T17:43:10 Move system directory cache out of utils
Russell Belfer 72556cc6 2014-02-20T14:27:10 Address PR comments * Make GIT_INLINE an internal definition so it cannot be used in public headers * Fix language in CONTRIBUTING * Make index caps API use signed instead of unsigned values
Ben Straub 9bda5fb8 2014-02-18T14:05:30 Improve error propagation in shallow call
Russell Belfer 2d929194 2014-02-07T16:14:17 Merge pull request #2099 from libgit2/bs/more-reflog-stuff More reflogness
Russell Belfer 3158e2fe 2014-02-07T15:24:39 Fix some Windows warnings This fixes a number of warnings with the Windows 64-bit build including a test failure in test_repo_message__message where an invalid pointer to a git_buf was being used.
Ben Straub 010cec3a 2014-02-04T20:50:40 Add reflog params to git_repository_detach_head
Ben Straub eec2761f 2014-02-03T15:06:32 Fix warning
Ben Straub 7ac1b899 2014-02-01T11:46:15 Add failing test case
Ben Straub a1710a28 2014-01-29T10:35:46 Enhance testing of signature parameters
Ben Straub 2952a9d0 2014-01-27T13:39:48 Ensure creating HEAD creates its reflog
Ben Straub a2311f92 2014-01-27T13:12:31 Ensure updating HEAD updates reflog
Ben Straub 94f263f5 2014-01-25T08:04:49 Add reflog params to set-head calls
Carlos Martín Nieto 7a3bd1e7 2014-01-26T15:35:17 repository: move to use a git_buf for outputting strings Since we now export that type, we can avoid making the user guess a size.
Carlos Martín Nieto 0b28217b 2014-01-15T12:51:31 refs: remove the _with_log differentiation Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests