tests-clar


Log

Author Commit Date CI Message
Russell Belfer d5e44d84 2012-11-29T17:02:27 Fix function name and add real error check `revwalk.h:commit_lookup()` -> `git_revwalk__commit_lookup()` and make `git_commit_list_parse()` do real error checking that the item in the list is an actual commit object. Also fixed an apparent typo in a test name.
Scott J. Goldman 0d9e0323 2012-11-27T23:27:41 Add the ahead/behind test that Carlos suggested Adds a repo with a more complex topology to test the ahead-behind count.
Scott J. Goldman 0984c876 2012-11-28T18:27:43 Rename git_count_ahead_behind -> git_graph_ahead_behind Moved it into graph.{c,h} which i created for the new "graph" functions namespace. Also adjusted the function prototype to use `size_t` and `const git_oid *`.
Scott J. Goldman eddde618 2012-11-27T16:37:11 Add tests for ahead-behind count
Russell Belfer c3fb7d04 2012-11-27T15:00:49 Make git_odb_foreach_cb take const param This makes the first OID param of the ODB callback a const pointer and also propogates that change all the way to the backends.
Russell Belfer 2bd5998c 2012-11-27T14:47:39 Remove git_note_data structure
Ben Straub cb7ac81c 2012-11-27T13:30:04 Fix warning
Ben Straub df705148 2012-11-27T13:15:43 API updates for remote.h Includes typedef for git_direction, and renames for GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
Russell Belfer a8122b5d 2012-11-21T15:39:03 Fix warnings on Win64 build
Russell Belfer 16248ee2 2012-11-21T11:03:07 Fix up some missing consts in tree & index This fixes some missed places where we can apply const-ness to various public APIs. There are still some index and tree APIs that cannot take const pointers because we sort our `git_vectors` lazily and so we can't reliably bsearch the index and tree content without applying a `git_vector_sort()` first. This also fixes some missed places where size_t can be used and where const can be applied to a couple internal functions.
Ben Straub f45d51ff 2012-11-20T19:57:46 API updates for index.h
Russell Belfer d9023dbe 2012-11-20T17:06:54 API updates for tag.h
Russell Belfer 9cd42358 2012-11-20T16:57:16 API updates for submodule.h
Russell Belfer 793c4385 2012-11-20T16:36:06 Update diff callback param order This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
Ben Straub 54b2a37a 2012-11-20T16:02:25 Clean up config.h
Russell Belfer e120123e 2012-11-20T14:01:46 API review / update for tree.h
Vicent Marti cfbe4be3 2012-11-17T19:54:47 More external API cleanup Conflicts: src/branch.c tests-clar/refs/branches/create.c
Ben Straub 2508cc66 2012-11-18T21:38:08 Rename ref and reflog apis for consistency
Vicent Martí c4d8df27 2012-11-23T15:19:47 Merge pull request #1097 from nulltoken/topic/head_tree_error Make `git_repository_head_tree()` return error codes
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 5cec896a 2012-11-22T18:51:06 repo: Make git_repository_head_tree() return error codes
nulltoken a94002a9 2012-11-22T18:50:50 test: Minor fixes
Philip Kelley 5cf1b4f0 2012-11-22T11:16:35 Call git_remote_update_tips before git_remote_disconnect
Eduardo Bart e566b609 2012-11-20T00:57:56 Update clar tests p_lstat_posixly and p_lstat
Scott J. Goldman 1876360f 2012-11-18T16:59:42 Add a test for invalid filenames while writing tree from index
Scott J. Goldman 19af78bb 2012-11-18T15:15:24 Prevent creating `..`, `.`, and `.git` with tree builder As per core git.
Michael Schubert 0066955d 2012-11-18T04:27:49 Fix a couple of warnings
nulltoken b15df1d9 2012-11-17T18:29:51 reflog: make entry_byindex() and drop() git compliant Passing 0 as the index now retrieves the most recent entry instead of the oldest one.
nulltoken 270160b9 2012-11-17T13:39:24 config: Opening a nonexistent file returns ENOTFOUND
nulltoken 6091457e 2012-11-17T07:19:14 repo: ensure is_empty() checks there are no refs
nulltoken f5a0e734 2012-11-17T06:46:42 tests: introduce cl_git_remove_placeholders()
nulltoken 5df7207a 2012-11-17T06:56:19 repo: readonly tests don't need a sandboxed repo
nulltoken 0e95e70a 2012-11-17T05:22:39 env: ensure git_futils_find_xxx() returns ENOTFOUND
nulltoken aa8a76ef 2012-11-17T05:12:14 tag: rename git_tag_type to git_tag_target_type
nulltoken 86b9dbc1 2012-11-17T04:50:48 Fix MSVC compilation warnings
Vicent Martí e087973e 2012-11-16T10:27:46 Merge pull request #1075 from carlosmn/alternates-recurse odb: recursively load alternates
Carlos Martín Nieto 85e7efa1 2012-11-14T13:35:43 odb: recursively load alternates The maximum depth is 5, like in git
Scott J. Goldman 0cd063fd 2012-11-15T23:28:52 Merge pull request #1071 from arrbee/alternate-fix-strcmp Win32 fixes for diff/checkout/reset
Russell Belfer bbe6dbec 2012-11-14T23:29:48 Add explicit git_index ptr to diff and checkout A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
Russell Belfer bad68c0a 2012-11-13T14:02:59 Add iterator for git_index object The index iterator could previously only be created from a repo object, but this allows creating an iterator from a `git_index` object instead (while keeping, though renaming, the old function).
Russell Belfer 5735bf5e 2012-11-13T13:58:29 Fix diff API to better parameter order The diff API is not in the parameter order one would expect from other libgit2 APIs. This fixes that.
Russell Belfer 402b92cf 2012-11-14T22:44:17 Fix reset hard tests on platforms with CRLF The reset hard tests had hardcoded expected file content and was not correctly compensating for CRLF filtering when a file needed to be reverted by the reset hard. This fixes that.
Russell Belfer cccacac5 2012-11-14T22:41:51 Add POSIX compat lstat() variant for win32 The existing p_lstat implementation on win32 is not quite POSIX compliant when setting errno to ENOTDIR. This adds an option to make is be compliant so that code (such as checkout) that cares to have separate behavior for ENOTDIR can use it portably. This also contains a couple of other minor cleanups in the posix_w32.c implementations to avoid unnecessary work.
Vicent Martí 513e794e 2012-11-13T14:59:18 Merge pull request #1068 from carlosmn/config-empty-value Deal with empty and nonexsitent values in config
Carlos Martín Nieto 0da81d2b 2012-11-13T14:43:23 config: return an emtpy string when there is no value Returning NULL for the string when we haven't signaled an error condition is counter-intuitive and causes unnecessary edge cases. Return an empty string when asking for a string value for a configuration variable such as '[section] var' to avoid these edge cases. If the distinction between no value and an empty value is needed, this can be retrieved from the entry directly. As a side-effect, this change stops the int parsing functions from segfaulting on such a variable.
Vicent Martí aa1c3b58 2012-11-13T14:13:47 Merge pull request #1016 from arrbee/fix-checkout-dir-removal Update checkout with new strategies & behavior
Carlos Martín Nieto 47db054d 2012-11-13T13:41:01 config: distinguish between a lone variable name and one without rhs '[section] variable' and '[section] variable =' behave differently when parsed as booleans, so we need to store that distinction internally.
Carlos Martín Nieto 3ee078c0 2012-11-13T13:46:17 config: rename get_config_entry -> config_entry We're already in the git_config namespace, there is no need to repeat it.
Edward Thomson 603bee07 2012-11-12T19:22:49 Remove git_hash_ctx_new - callers now _ctx_init()
Edward Thomson d6fb0924 2012-11-05T12:37:15 Win32 CryptoAPI and CNG support for SHA1
Ben Straub e45423dd 2012-11-13T05:45:08 Merge pull request #1065 from nulltoken/fix/memory-leak Fix memory leaks
Michael Schubert d51e54f1 2012-11-13T14:28:44 Remove unused variables
nulltoken 4e547eee 2012-11-13T07:11:24 test: fix memory leak
Vicent Marti 9a50026b 2012-11-12T15:38:28 clar-helpers: Oops, grab pointer
Vicent Marti 19c044a1 2012-11-12T14:23:17 Merge remote-tracking branch 'ben/local-transport' into development
nulltoken b1a3a70e 2012-11-12T00:14:51 repository: Refine repository_head() error report
nulltoken ef887151 2012-11-11T23:52:37 Fix compilation warning
Edward Thomson b0f6e45d 2012-11-01T15:47:18 create FETCH_HEAD specially instead of as a ref file
Vicent Martí d18713fb 2012-11-10T20:24:53 Merge pull request #1056 from nulltoken/duplicate-tree-entries Duplicate tree entries
nulltoken 33f95a9b 2012-11-10T21:01:05 index: refine add_from_workdir() error report
nulltoken 69c068c7 2012-11-10T20:42:45 index: make git_index_new() work with a NULL path
nulltoken 353e9916 2012-11-10T16:43:05 tests: Add missing assertions
Ben Straub 2ff1a0d0 2012-11-09T16:59:46 Helpers for local-filesystem remote URLs
Russell Belfer 757b4065 2012-11-09T14:01:44 Fix warnings and valgrind issues This fixes some various warnings that showed up in Travis and a couple uses of uninitialized memory and one memory leak.
Russell Belfer 8064ecba 2012-11-09T10:48:25 Update reset hard test The `git_reset` API with the HARD option is still slightly broken, but this test now does exercise the ability of the command to revert modified files.
Russell Belfer ad9a921b 2012-11-08T17:05:07 Rework checkout with new strategy options This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
Russell Belfer 18eff2ad 2012-11-08T16:44:39 Clean up a couple things missed in rebase
Russell Belfer 32def5af 2012-10-24T17:37:07 Fix checkout behavior when its hands are tied So, @nulltoken created a failing test case for checkout that proved to be particularly daunting. If checkout is given only a very limited strategy mask (e.g. just GIT_CHECKOUT_CREATE_MISSING) then it is possible for typechange/rename modifications to leave it unable to complete the request. That's okay, but the existing code did not have enough information not to generate an error (at least for tree/blob conflicts). This led me to a significant reorganization of the code to handle the failing case, but it has three benefits: 1. The test case is handled correctly (I think) 2. The new code should actually be much faster than the old code since I decided to make checkout aware of diff list internals. 3. The progress value accuracy is hugely increased since I added a fourth pass which calculates exactly what work needs to be done before doing anything.
Russell Belfer 331e7de9 2012-10-24T17:32:50 Extensions to rmdir and mkdir utilities * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing combinations of flags * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that are left empty after removal * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file, not a dir (previously an EEXISTS error was ignored, even for files) and enable this flag for git_futils_mkpath2file call * Improve accuracy of error messages from git_futils_mkdir
nulltoken 55f9837f 2012-11-09T21:49:50 config: make git_config_open_level() work with an empty config
Ben Straub 11fabe73 2012-11-08T20:18:19 Local fetch: add tests
Ben Straub 505da062 2012-11-06T10:26:06 Implement local transport's fetch
nulltoken f92bcaea 2012-11-08T17:39:23 index: prevent tree creation from a non merged state Fix libgit2/libgit2sharp#243
nulltoken 7cc1bf0f 2012-11-08T21:08:59 index: Introduce git_index_has_conflicts()
nulltoken 29cc374d 2012-11-08T17:37:01 tree: enforce coverage of silent entry replacement
delanne bcad677b 2012-11-08T12:28:21 - Update 'tests-clar/resources/config/config11' in order to reproduce the invalidread with the unittest (just added some \n at the end of the file) - Fix config_file.c
Vicent Martí 8ff2b0c7 2012-11-07T16:30:55 Merge pull request #1039 from erikvanzijst/erik/tag_without_message Correctly parse tags lacking a description
Russell Belfer a5e85d86 2012-11-05T11:06:50 Merge pull request #1046 from libgit2/empty-remote-url-crash Bail out of remote loading if the URL would be NULL
Justin Spahr-Summers 6edefa14 2012-11-05T10:58:08 Revert "Don't expect the 'empty-remote-url' remote to be listed" Apparently git_remote_list() includes even remotes for which git_remote_load() would fail. Sorry @nulltoken, false alarm. This reverts commit f358ec143c8c9952227d31cd21c24f8c9be23d3c.
Justin Spahr-Summers f358ec14 2012-11-05T10:45:26 Don't expect the 'empty-remote-url' remote to be listed CC @nulltoken
Justin Spahr-Summers 1fe99aee 2012-11-05T10:44:48 Test for GITERR_INVALID
Russell Belfer 065be7a1 2012-11-05T10:44:21 Merge pull request #1044 from dahlbyk/repo/state Fix state when HEAD is not detached
Vicent Martí 942a7698 2012-11-05T06:54:34 Merge pull request #1034 from carlosmn/packbuilder-foreach Let the user grab the packfile as it's being written
nulltoken a2a61894 2012-11-05T07:49:37 remote: Add malformed remote load test
Keith Dahlby 35d255fd 2012-11-04T12:13:42 repo: fix state when HEAD is not detached
Erik van Zijst 6bb9fea1 2012-11-02T10:28:17 tags: Fixed the tag parser to correctly treat the message field as optional. This fix makes libgit2 capable of parsing annotated tag objects that lack the optional message/description field. Previously, libgit2 treated this field as mandatory and raised a tag_error on such tags. However, the message field is optional. An example of such a tag is refs/tags/v2.6.16.31-rc1 in Linux: $ git cat-file tag refs/tags/v2.6.16.31-rc1 object afaa018cefb6af63befef1df7d8febaae904434f type commit tag v2.6.16.31-rc1 tagger Adrian Bunk <bunk@stusta.de> 1162716505 +0100 $
Vicent Martí 1362a983 2012-11-02T10:00:28 Merge pull request #1014 from arrbee/diff-rename-detection Initial implementation of diff rename detection
Vicent Martí d13da328 2012-11-01T14:18:40 Merge pull request #1038 from arrbee/doc-fixes Improve docs, examples, warnings
Russell Belfer b90500f0 2012-11-01T14:08:30 Improve docs, examples, warnings This improves docs in some of the public header files, cleans up and improves some of the example code, and fixes a couple of pedantic warnings in places.
Vicent Marti 43eeca04 2012-11-01T20:24:43 index: Fix tests
Vicent Martí 7ae73e94 2012-11-01T09:15:29 Merge pull request #1030 from pwkelley/transports Reorganize transport architecture
Philip Kelley e068f2bb 2012-11-01T11:50:08 Fix a bug in cl_setenv on Windows XP
Philip Kelley 41fb1ca0 2012-10-29T13:41:14 Reorganize transport architecture (squashed 3)
Carlos Martín Nieto 3dfed9cb 2012-10-31T10:26:04 packbuilder: add git_packbuilder_foreach Let the user get each object as a buffer+size pair so they can handle the packfile content as they need to.
Russell Belfer 744cc03e 2012-10-30T12:10:36 Add git_config_refresh() API to reload config This adds a new API that allows users to reload the config if the file has changed on disk. A new config callback function to refresh the config was added. The modified time and file size are used to test if the file needs to be reloaded (and are now stored in the disk backend object). In writing tests, just using mtime was a problem / race, so I wanted to check file size as well. To support that, I extended `git_futils_readbuffer_updated` to optionally check file size in addition to mtime, and I added a new function `git_filebuf_stats` to fetch the mtime and size for an open filebuf (so that the config could be easily refreshed after a write). Lastly, I moved some similar file checking code for attributes into filebuf. It is still only being used for attrs, but it seems potentially reusable, so I thought I'd move it over.
Vicent Martí efde4225 2012-10-30T12:04:28 Merge pull request #1017 from arrbee/diff-patch-to-str Add git_diff_patch_to_str API
Vicent Martí c4a9ded0 2012-10-30T12:03:22 Merge pull request #1026 from nulltoken/repo/state repo: enhance git_repository_state() detection
Vicent Martí 6c21358a 2012-10-30T11:51:58 Merge pull request #1029 from ethomson/index_refactor Index changes
Michael Schubert 6cfbbf7e 2012-10-30T18:50:59 Fix a couple of warnings
Russell Belfer db106d01 2012-10-30T09:40:50 Move rename detection into new file This improves the naming for the rename related functionality moving it to be called `git_diff_find_similar()` and renaming all the associated constants, etc. to make more sense. I also moved the new code (plus the existing `git_diff_merge`) into a new file `diff_tform.c` where I can put new functions related to manipulating git diff lists. This also updates the implementation significantly from the last revision fixing some ordering issues (where break-rewrite needs to be handled prior to copy and rename detection) and improving config option handling.