tests


Log

Author Commit Date CI Message
Vicent Marti 44cfb6f3 2014-07-11T16:49:23 Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths ssh: provide a factory function for setting ssh paths
Carlos Martín Nieto d4256ed5 2014-07-04T10:00:39 ssh: provide a factory function for setting ssh paths git allows you to set which paths to use for the git server programs when connecting over ssh; and we want to provide something similar. We do this by providing a factory function which can be set as the remote's transport callback which will set the given paths upon creation.
Carlos Martín Nieto f5287fa6 2014-07-04T17:17:23 refspec: support asterisks in the middle of a pattern We used to assume a refspec would only have an asterisk in the middle of their respective pattern. This has not been a valid assumption for some time now with git. Instead of assuming where the asterisk is going to be, change the logic to treat each pattern as having two halves with a replacement bit in the middle, where the asterisk is.
Vicent Marti b0ed61f8 2014-07-03T15:30:38 Merge pull request #2460 from libgit2/cmn/sched-yield Move yield to the tests and enable for FreeBSD
Carlos Martín Nieto 905fb592 2014-07-03T05:47:34 Move yield to the tests and enable for FreeBSD Move the definition of git_thread_yield() to the test which needs it and add the correct definition for it for FreeBSD and derivatives. Original patch adding FreeBSD and derivatives by @jacquesg.
Vicent Marti 193fe9cb 2014-07-03T02:41:10 Merge pull request #2459 from libgit2/cmn/http-url-path netops: error out on url without a path
Carlos Martín Nieto 1380e7c6 2014-07-03T02:34:32 netops: error out on url without a path In order to connect to a remote server, we need to provide a path to the repository we're interested in. Consider the lack of path in the url an error.
Vicent Marti c1bf2942 2014-07-02T15:29:25 Merge pull request #2455 from ethomson/equal_oid Introduce `cl_assert_equal_oid`
Vicent Marti 4df4ebd7 2014-07-02T15:29:14 Merge pull request #2453 from ethomson/checkout_index git_checkout_index: checkout other indexes
Vicent Marti b0ca1b18 2014-07-02T15:29:05 Merge pull request #2452 from libgit2/cmn/clone-custom-repo Provide a callback to customize the repository on clone
Carlos Martín Nieto 6812afaf 2014-06-30T21:36:38 clone: remote git_clone_into{,_local} from the public API As git_clone now has callbacks to configure the details of the repository and remote, remove the lower-level functions from the public API, as they lack some of the logic from git_clone proper.
Edward Thomson 967f5a76 2014-05-23T14:50:51 git_checkout_index: checkout other indexes git_checkout_index can now check out other git_index's (that are not necessarily the repository index). This allows checkout_index to use the repository's index for stat cache information instead of the index data being checked out. git_merge and friends now check out their indexes directly instead of trying to blend it into the running index.
Edward Thomson 9879fee1 2014-07-01T14:11:14 revwalk::simplify test should test The revwalk::simplify test was not actually tested the values from the revwalk against the expected. (Further, the expected had two IDs transposed.)
Edward Thomson 0cee70eb 2014-07-01T14:09:01 Introduce cl_assert_equal_oid
Russell Belfer 5fa8cda9 2014-06-30T12:05:25 Round up pool alloc sizes for alignment To make sure that items returned from pool allocations are aligned on nice boundaries, this rounds up all pool allocation sizes to a multiple of 8. This adds a small amount of overhead to each item. The rounding up could be made optional with an extra parameter to the pool initialization that turned on rounding only for pools where item alignment actually matters, but I think for the extra code and complexity that would be involved, that it makes sense just to burn a little bit of extra memory and enable this all the time.
Vicent Marti dcdb8500 2014-06-30T17:35:42 Merge pull request #2440 from phkelley/transports Improvements to git_transport extensibility
Philip Kelley 1697cd6f 2014-06-25T13:20:27 Improvements to git_transport extensibility git_remote_set_transport now takes a transport factory rather than a transport git_clone_options now allows the caller to specify a remote creation callback
Edward Thomson f4046267 2014-06-26T09:16:12 checkout::conflict tests: only test owner mode The checkout::conflict type conflict tests were failing because they were overly assertive about the resultant mode, testing group & other bits, which failed miserably for people who had a umask less restrictive than 022. Only test the resultant owner bits.
Edward Thomson d412165f 2014-06-18T16:54:32 Update text=auto / core.autocrlf=false behavior Git for Windows 1.9.4 changed the behavior when the text=auto attribute is specified and core.autocrlf=false. Previous observed behavior would *not* filter files when going into the working directory, the new behavior *does* filter. Update our behavior to match.
Carlos Martín Nieto 3ddd0d92 2014-06-24T17:55:15 Merge remote-tracking branch 'upstream/cmn/mixed-eol-passthrough'
Carlos Martín Nieto 5e37874d 2014-06-24T17:51:45 Merge remote-tracking branch 'upstream/cmn/treebuilder-perf'
Carlos Martín Nieto 5a76ad35 2014-06-19T11:45:46 crlf: pass-through mixed EOL buffers from LF->CRLF When checking out files, we're performing conversion into the user's native line endings, but we only want to do it for files which have consistent line endings. Refuse to perform the conversion for mixed-EOL files. The CRLF->LF filter is left as-is, as that conversion is considered to be normalization by git and should force a conversion of the line endings.
Carlos Martín Nieto b3b66c57 2014-06-18T17:13:12 Share packs across repository instances Opening the same repository multiple times will currently open the same file multiple times, as well as map the same region of the file multiple times. This is not necessary, as the packfile data is immutable. Instead of opening and closing packfiles directly, introduce an indirection and allocate packfiles globally. This does mean locking on each packfile open, but we already use this lock for the global mwindow list so it doesn't introduce a new contention point.
Carlos Martín Nieto 09561d33 2014-06-13T22:27:46 test: remove assembla clone test The assembla failure we were seeing referred to a private repository, which is not what is there at the moment. This reverts 1fd21b0342f
Carlos Martín Nieto 3382d8b1 2014-06-13T22:24:43 test: use read-only account Don't write in plaintext the password of an account which has full control over the repository. Instead use an account with read-only access.
Carlos Martín Nieto 4d3f1f97 2014-06-09T04:38:22 treebuilder: use a map instead of vector to store the entries Finding a filename in a vector means we need to resort it every time we want to read from it, which includes every time we want to write to it as well, as we want to find duplicate keys. A hash-map fits what we want to do much more accurately, as we do not care about sorting, but just the particular filename. We still keep removed entries around, as the interface let you assume they were going to be around until the treebuilder is cleared or freed, but in this case that involves an append to a vector in the filter case, which can now fail. The only time we care about sorting is when we write out the tree, so let's make that the only time we do any sorting.
Vicent Marti ce5e6617 2014-06-08T16:44:32 Merge pull request #2407 from libgit2/cmn/remote-rename-more More remote rename fixes
Philip Kelley fb591767 2014-06-07T12:51:48 Win32: Fix object::cache::threadmania test on x64
Philip Kelley daf2a648 2014-06-07T12:18:56 Win32: Fix diff::workdir::submodules test #2361
Philip Kelley 6d1b0438 2014-06-07T12:18:24 Win32: Fix failing clone_mirror test
Carlos Martín Nieto 231f350d 2014-06-06T22:55:34 remote: don't free the remote on delete This was a bad idea. Don't free except in the free function.
Carlos Martín Nieto eb6aa791 2014-06-06T22:01:35 remote: failing test for renaming with a symref
Carlos Martín Nieto 72bca13e 2014-06-06T16:33:54 remote: return problem refspecs instead of using a callback There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Carlos Martín Nieto fe3b9d07 2014-06-06T00:54:11 remote: failing test for rename When there is a reference in the target namespace, we should overwrite it. Instead it gets a different name under the current code.
Russell Belfer dfcba09e 2014-06-03T13:05:20 Merge pull request #2395 from libgit2/cmn/ref-iter-concurrent Concurrent ref iterator access
Vicent Marti bccb36eb 2014-06-03T17:25:59 Merge pull request #2389 from arthurschreiber/arthur/set-error-when-no-remote-found Remote: Set an error when a remote cannot be found.
Carlos Martín Nieto 69a1a691 2014-06-03T16:18:08 Plug a leak in the tests
Carlos Martín Nieto 4ee2543c 2014-06-02T16:46:47 refs: failing test for concurrent ref access If we remove a reference while we're iterating through the packed refs, the position in the iterator will be off.
Arthur Schreiber d723dbed 2014-05-30T19:26:49 Remote: Set an error when a remote cannot be found. Inside `git_remote_load`, the calls to `get_optional_config` use `giterr_clear` to unset any errors that are set due to missing config keys. If neither a fetch nor a push url config was found for a remote, we should set an error again.
Edward Thomson 49837fd4 2014-05-30T11:30:53 Ignore core.safecrlf=warn until we have a warn infrastructure
Arthur Schreiber 9d6c3d28 2014-05-30T15:15:54 Refs: Extend unicode test for branch creation. This adds another assertion to ensure that the reference name inside the git_reference struct returned by `git_branch_create` is returned as precomposed if `core.precomposeunicode` is enabled.
Arthur Schreiber 1a90b1e3 2014-05-30T14:53:28 Refs: Add a unicode test for git_branch_move. This tests that decomposed branch names are correctly precomposed when passed to `git_branch_move` and `core.precomposeunicode` is enabled.
Vicent Marti 31c55152 2014-05-29T14:50:57 Merge pull request #2011 from libgit2/cmn/clone-local Local clone
Carlos Martín Nieto bc9f67fa 2014-05-29T10:03:04 clone: more explicit local tests Assert the exact amount of links we expect. While there, check that a plain git_clone() automatically chooses to link.
Carlos Martín Nieto 2614819c 2014-05-28T11:28:57 clone: allow for linking in local clone If requested, git_clone_local_into() will try to link the object files instead of copying them. This only works on non-Windows (since it doesn't have this) when both are on the same filesystem (which are unix semantics).
Carlos Martín Nieto 94f742ba 2014-05-28T10:18:05 fileops: allow linking files when copying directory structures When passed the LINK_FILES flag, the recursive copy will hardlink files instead of copying them.
Carlos Martín Nieto c1dbfcbb 2014-05-28T10:07:23 clone: add flag not to link
Carlos Martín Nieto 121b2673 2013-12-23T11:12:31 clone: add flags to override whether to perform a local clone
Vicent Marti 5d91bea2 2014-05-28T13:55:57 Merge pull request #2380 from libgit2/cmn/index-add-modes index: check for valid filemodes on add
Vicent Marti ab882e21 2014-05-28T13:49:38 Merge pull request #2385 from karipe/development Fix compile error on Visual Studio
Edward Thomson eff531e1 2014-05-27T20:58:20 Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
Edward Thomson a3622ba6 2014-05-16T13:54:40 Move GIT_MERGE_CONFIG_* to its own enum
Edward Thomson d362093f 2014-05-08T15:41:36 Introduce GIT_MERGE_CONFIG_* for merge.ff settings git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when merge.ff=true
Cha, Hojeong 3ac1ff42 2014-05-27T23:32:38 Fix compile error on Visual Studio
Carlos Martín Nieto 052a2ffd 2014-05-22T16:01:02 index: check for valid filemodes on add
Vicent Marti a5982644 2014-05-22T02:28:42 Merge pull request #2376 from libgit2/cmn/remote-symref Add support for the symref extension
Vicent Marti 7ee233a9 2014-05-22T02:27:33 Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform Make core.safecrlf not generate an error on LF-ending platforms
Carlos Martín Nieto d22db24f 2014-05-21T09:32:35 remote: add api to guess the remote's default branch If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
Carlos Martín Nieto 306475eb 2014-05-20T09:55:26 remote: expose the remote's symref mappings Add a symref_target field to git_remote_head to expose the symref mappings to the user.
Carlos Martín Nieto 430866d2 2014-05-20T08:29:51 Fix a leak in the tests
Russell Belfer 16798d08 2014-05-19T14:57:09 Make core.safecrlf work on LF-ending platforms If you enabled core.safecrlf on an LF-ending platform, we would error even for files with all LFs. We should only be warning on irreversible mappings, I think.
Vicent Marti 124a45ea 2014-05-19T15:00:50 Merge pull request #2354 from libgit2/cmn/clone-into-mirror Allow mirror-clone via `git_clone_into()`
Carlos Martín Nieto b2067248 2014-05-15T09:03:30 clone: add failing test for a mirror-clone with clone_into Show a failure to perform a mirror-clone from a repository, both local and remote.
Carlos Martín Nieto 49e369b2 2014-05-18T10:06:49 message: don't assume the comment char The comment char is configurable and we need to provide a way for the user to specify which comment char they chose for their message.
Philip Kelley d7a29463 2014-05-17T16:58:09 Fix a bug in the pack::packbuilder suite
Vicent Marti 191ff936 2014-05-17T02:37:13 Merge pull request #2362 from libgit2/rb/update-4k-to-8k Test and fix Git diff binary detection compatibility
Russell Belfer 8af4966d 2014-05-16T16:30:58 Git binary check compat tests A variety of data patterns for diffs verified to match the behavior of binary detection with Git on the command line.
Vicent Marti 228272ef 2014-05-16T11:56:37 Merge pull request #2313 from libgit2/cmn/remote-delete Remote deletion
Carlos Martín Nieto ec8a949a 2014-04-30T09:20:03 remote: remove remote-tracking branches on delete When we delete a remote, we also need to go through its fetch refspecs and remove the references they create locally.
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.
Vicent Marti 03fcef18 2014-05-13T12:40:13 Merge pull request #2328 from libgit2/rb/how-broken-can-ignores-be Improve checks for ignore containment
Russell Belfer df341926 2014-05-12T10:51:56 Merge pull request #2336 from libgit2/rb/unicode-branch-names Pass unconverted Unicode path data when iconv doesn't like it
Russell Belfer af567e88 2014-05-12T10:44:13 Merge pull request #2334 from libgit2/rb/fix-2333 Be more careful with user-supplied buffers
Russell Belfer ce3b71d9 2014-05-12T10:28:45 Don't scale diff stat when not needed
Russell Belfer 7bcced44 2014-05-12T10:15:30 Merge pull request #2300 from libgit2/cmn/match-host-tests Some improvements to the cert checking
Russell Belfer d2c4d1c6 2014-05-12T10:04:52 Merge pull request #2188 from libgit2/cmn/config-snapshot Configuration snapshotting
Vicent Marti e18d5e52 2014-05-09T08:59:59 Merge pull request #2331 from libgit2/rb/dont-stop-diff-on-safecrlf Add filter options and ALLOW_UNSAFE
Russell Belfer bb45e390 2014-05-08T15:01:07 Disable threads::refdb::edit_while_iterate test It seems that with the various recent changes to reference updating and reflog writing, that the thread safety of refdb updates has been reduced (either that or it was never thread safe and the window for error has increased). Either way, this test is now sometimes segfaulting which is no good, so let's disable the test for now. We don't really make any public promises about thread safety for this type of operation, so I think this is acceptable, at least in the short term.
Russell Belfer 8a2ef218 2014-05-08T14:48:27 Don't always test composed-insensitive lookups Only on a filesystem that is composed/decomposed insensitive, should be testing that a branch can be looked up by the opposite form and still work correctly.
Russell Belfer be20ac5a 2014-05-08T14:33:37 Allow cl_repo_get_bool to work with missing key One of the test helpers provides a quick way for looking up a boolean key. But if the key way missing completely, the check would actually raise an error. Given the way we use this helper, if the key is missing, this should just return false, I think.
Russell Belfer 43a04135 2014-05-08T13:52:46 Pass unconverted data when iconv doesn't like it When using Iconv to convert unicode data and iconv doesn't like the source data (because it thinks that it's not actual UTF-8), instead of stopping the operation, just use the unconverted data. This will generally do the right thing on the filesystem, since that is the source of the non-UTF-8 path data anyhow. This adds some tests for creating and looking up branches with messy Unicode names. Also, this takes the helper function that was previously internal to `git_repository_init` and makes it into `git_path_does_fs_decompose_unicode` which is a useful in tests to understand what the expected results should be.
Russell Belfer 1e4976cb 2014-05-08T10:17:14 Be more careful with user-supplied buffers This adds in missing calls to `git_buf_sanitize` and fixes a number of places where `git_buf` APIs could inadvertently write NUL terminator bytes into invalid buffers. This also changes the behavior of `git_buf_sanitize` to NUL terminate a buffer if it can and of `git_buf_shorten` to do nothing if it can. Adds tests of filtering code with zeroed (i.e. unsanitized) buffer which was previously triggering a segfault.
Russell Belfer 5269008c 2014-05-06T16:01:49 Add filter options and ALLOW_UNSAFE Diff and status do not want core.safecrlf to actually raise an error regardless of the setting, so this extends the filter API with an additional options flags parameter and adds a flag so that filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating that unsafe filter application should be downgraded from a failure to a warning.
Russell Belfer f554611a 2014-05-06T12:41:26 Improve checks for ignore containment The diff code was using an "ignored_prefix" directory to track if a parent directory was ignored that contained untracked files alongside tracked files. Unfortunately, when negative ignore rules were used for directories inside ignored parents, the wrong rules were applied to untracked files inside the negatively ignored child directories. This commit moves the logic for ignore containment into the workdir iterator (which is a better place for it), so the ignored-ness of a directory is contained in the frame stack during traversal. This allows a child directory to override with a negative ignore and yet still restore the ignored state of the parent when we traverse out of the child. Along with this, there are some problems with "directory only" ignore rules on container directories. Given "a/*" and "!a/b/c/" (where the second rule is a directory rule but the first rule is just a generic prefix rule), then the directory only constraint was having "a/b/c/d/file" match the first rule and not the second. This was fixed by having ignore directory-only rules test a rule against the prefix of a file with LEADINGDIR enabled. Lastly, spot checks for ignores using `git_ignore_path_is_ignored` were tested from the top directory down to the bottom to deal with the containment problem, but this is wrong. We have to test bottom to top so that negative subdirectory rules will be checked before parent ignore rules. This does change the behavior of some existing tests, but it seems only to bring us more in line with core Git, so I think those changes are acceptable.
Carlos Martín Nieto ee311907 2014-05-05T16:04:14 odb: ignore files in the objects dir We assume that everything under GIT_DIR/objects/ is a directory. This is not necessarily the case if some process left a stray file in there. Check beforehand if we do have a directory and ignore the entry otherwise.
Vicent Marti 272b462d 2014-05-02T09:50:15 Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache Reduce excessive OID calculation for diff and stat
Russell Belfer 9862ef8e 2014-05-02T09:42:07 Merge pull request #2310 from libgit2/cmn/commit-create-safe commit: safer commit creation with reference update
Russell Belfer 99dfa470 2014-05-01T15:12:12 Some further sandboxing cleanups to tests Trying to find other issues where tests may not clean up quite properly when they are through...
Russell Belfer 0f603132 2014-05-01T14:47:33 Improve handling of fake home directory There are a few tests that set up a fake home directory and a fake GLOBAL search path so that we can test things in global ignore or attribute or config files. This cleans up that code to work more robustly even if there is a test failure. This also fixes some valgrind warnings where scanning search paths for separators could end up doing a little bit of sketchy data access when coming to the end of search list.
Russell Belfer bc91347b 2014-04-30T11:16:31 Fix remaining init_options inconsistencies There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
Russell Belfer 9c8ed499 2014-04-29T15:05:58 Remove trace / add git_diff_perfdata struct + api
Russell Belfer 7a2e56a3 2014-04-29T14:30:15 Get rid of redundant git_diff_options_init fn Since git_diff_init_options was introduced, remove this old fn.
Russell Belfer b23b112d 2014-04-29T11:29:49 Add payloads, bitmaps to trace API This is a proposed adjustment to the trace APIs. This makes the trace levels into a bitmask so that they can be selectively enabled and adds a callback-level payload, plus a message-level payload. This makes it easier for me to a GIT_TRACE_PERF callbacks that are simply bypassed if the PERF level is not set.
Russell Belfer 225aab5d 2014-04-28T16:47:39 Don't use trace if GIT_TRACE not defined
Russell Belfer cd424ad5 2014-04-28T16:39:53 Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API This adds an option to refresh the stat cache while generating status. It also rips out the GIT_PERF stuff I had an makes use of the trace API to keep statistics about what happens during diff.
Russell Belfer 94fb4aad 2014-04-28T14:48:41 Add diff option to update index stat cache When diff is scanning the working directory, if it finds a file where it is not sure if the index entry matches the working dir, it will recalculate the OID (which is pretty expensive). This adds a new flag to diff so that if the OID calculation finds that the file actually has not changed (i.e. just the modified time was altered or such), then it will refresh the stat cache in the index so that future calls to diff will not have to check the oid again.
Russell Belfer 8ef4e11a 2014-04-28T14:16:26 Skip diff oid calc when size definitely changed When we think the stat cache in the index seems valid and the size or mode of a file has definitely changed, then don't bother trying to recalculate the OID of the workdir bits to confirm that it is modified - just accept that it is modified. This can result in files that show as modified with no actual diff, but the behavior actually appears to match Git on the command line. This also includes a minor optimization to not perform a submodule lookup on the ".git" directory itself.
Russell Belfer 240f4af3 2014-04-28T14:04:29 Add build option for diff internal statistics
Russell Belfer d19b2f9f 2014-05-01T12:46:46 Make ** pattern eat trailing slash This allows "foo/**/*.html" to match "foo/file.html"
nulltoken 40e48ea4 2013-11-15T15:36:37 remote: Introduce git_remote_delete()