tests


Log

Author Commit Date CI Message
Vicent Marti a7fcac13 2014-09-15T20:26:12 Merge pull request #2554 from linquize/fetch-head-tag When auto follow tags, FETCH_HEAD should list only newly followed tags
Carlos Martín Nieto 76e3c43f 2014-09-10T18:13:34 signature: don't allow empty emails A signature is made up of a non-empty name and a non-empty email so let's validate that. This also brings us more in line with git, which also rejects ident with an empty email.
Vicent Marti 31e752b6 2014-09-09T12:52:36 Merge pull request #2511 from libgit2/cmn/remote-default-restrict Restrict which refs can be the default branch
Linquize d908351a 2014-09-05T22:31:53 When auto follow tags, FETCH_HEAD should list only newly followed tags
Vicent Marti 89e05e2a 2014-09-03T12:50:44 Merge pull request #2543 from libgit2/cmn/known-transports Clean up transport lookup
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.
Edward Thomson 0ee9f31c 2014-08-20T10:23:39 Introduce git_path_make_relative
Vicent Marti 0ac9f9a0 2014-09-03T00:13:23 Merge pull request #2545 from linquize/no-ssh Skip SSH clone tests if libgit2 not built with GIT_SSH defined
Carlos Martín Nieto 15c30b72 2014-09-02T13:23:54 clone: handle overly restrictive refspecs When the fetch refspec does not include the remote's default branch, it indicates an error in user expectations or programmer error. Error out in that case. This lets us get rid of the dummy refspec which can never work as its zeroed out. In the cases where we did not find a default branch, we set HEAD detached immediately, which lets us refactor the "normal" path, removing `found_branch`.
Carlos Martín Nieto e128a1af 2014-09-02T13:10:19 clone: correct handling of an unborn HEAD If the remote does not advertise HEAD, then it is unborn and we cannot checkout that branch. Handle it the same way as an empty repo.
Carlos Martín Nieto 538f9081 2014-09-01T16:35:10 remote: add test for single-branch clone When cloning, we may be asking for a particular branch or subset of branches. Make sure we test for that.
Carlos Martín Nieto f2ffab61 2014-09-01T15:59:36 remote: add tests for remote-branch edge cases Add tests for the case when there are no branches on the remote and when HEAD is detached but has the id of a non-branch. In both of these cases, we should return ENOTFOUND.
Linquize fe3b6789 2014-09-01T19:18:20 Skip SSH clone tests if libgit2 not built with GIT_SSH defined
Carlos Martín Nieto 05ac7051 2014-08-31T21:53:42 remote: test for supported URLs in a single place Instead of using ifdefs to run the tests, use them to set when we expect to support a particular scheme and always have the tests in the code.
Carlos Martín Nieto ba67c075 2014-08-31T17:16:40 remote: get rid of git_remote_valid_url() It does the same as git_remote_supported_url() but has a name which implies we'd check the URL for correctness while we're simply looking at the scheme and looking it up in our lists. While here, fix up the tests so we check all the combination of what's supported.
Linquize aff70018 2014-08-31T22:43:53 MSVC does not support zero size array
Vicent Marti 46a13f32 2014-08-29T18:19:56 Merge pull request #2481 from libgit2/cmn/oidarray merge: expose multiple merge bases
Carlos Martín Nieto 94412b00 2014-08-10T17:48:12 remote: assert what we want to happen when ther is no default branch Assert what we already do, so as to notice changes.
Vicent Marti d99c8ca1 2014-08-28T16:33:53 Merge pull request #2539 from libgit2/cmn/ahead-behind-order Fix ahead-behind results
Carlos Martín Nieto e07aebb4 2014-08-28T13:34:42 Fix ahead-behind tests The logic was reversed. I have checked manually each pair with git and adjusted the expectation to what git status prints.
Vicent Marti 69db8934 2014-08-27T19:19:55 Merge pull request #2538 from libgit2/ntk/propagate_url_parsing_error winhttp: Prevent swallowing of url parsing error
Vicent Marti 1485c683 2014-08-27T18:02:10 Merge pull request #2490 from csware/ssh-wintunnel Allow to override default ssh transport_cb - in order to allow third party ssh transports
nulltoken f0c53d21 2014-08-27T10:28:46 winhttp: Prevent swallowing of url parsing error
Sven Strickroth 0e5bb619 2014-08-26T17:28:41 Added some tests Signed-off-by: Sven Strickroth <email@cs-ware.de>
Carlos Martín Nieto c13b6844 2014-08-27T15:25:46 Adjust clone tests to USERNAME cred type
Carlos Martín Nieto 6a0d2b43 2014-08-27T15:09:07 Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry
Vicent Marti 00e9ae5a 2014-08-26T17:48:20 Merge pull request #2508 from libgit2/rb/fix-ignore-slash-star Fix bugs with negative ignores inside an ignored parent directory
Vicent Marti 5af52c62 2014-08-25T21:04:09 Merge pull request #2531 from libgit2/rb/mkdir-allow-parent-failures Allow mkdir helper to skip parent errors
Vicent Marti 2c1de697 2014-08-25T18:18:06 Merge pull request #2527 from jacquesg/refspec-crash Check if the refspec matches before transforming
Russell Belfer 668ae2dd 2014-08-22T10:05:09 Allow mkdir helper to skip parent errors Our mkdir helper was failing is a parent directory was not accessible even if the child directory could be created. This changes the helper to keep trying child directories even when the parent is unwritable.
Vicent Marti d28b2b7a 2014-08-18T15:18:59 Merge pull request #2528 from libgit2/vmg/tostr_s Export `git_oid_tostr_s` instead of `_allocfmt`
Vicent Marti 43ebca8d 2014-08-18T15:18:47 Revert "test: Remove symlinks from the source tree" This reverts commit 0dc54e149498bbd5de5e5ecc6006f9f5afb6588c.
Vicent Marti 0dc54e14 2014-08-18T12:44:41 test: Remove symlinks from the source tree We don't really use this at all, and it breaks packaging in Windows.
Vicent Marti 4ca0b566 2014-08-18T12:41:06 oid: Export `git_oid_tostr_s` instead of `_allocfmt` The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
Jacques Germishuys 4e53c280 2014-08-17T14:55:06 Check if the refspec matches before transforming
Jacques Germishuys dc8adda4 2014-08-15T22:51:19 git_remote_ls() should return an error if the transport is not available
Edward Thomson e003f83a 2014-07-31T15:14:56 Introduce git_buf_decode_base64 Decode base64-encoded text into a git_buf
Edward Thomson adcdeb36 2014-08-01T13:06:37 online::clone::credentials support default credentials
Edward Thomson f96e7e6c 2014-08-15T11:10:27 Free references during push validation
Edward Thomson 0f29e967 2014-08-01T13:43:46 Remove the refs/notes/commits that we push in test The online::push::notes test pushes a note but leaves it hanging around for other tests to stumble across when they're validating that they're seeing the refs they expect to see. Clean it up on exit.
Edward Thomson aea67633 2014-07-31T17:59:03 Don't run the ssh clone tests against http remotes
Vicent Marti fb48a51c 2014-08-14T17:01:02 Merge pull request #2469 from ethomson/transport2 Custom transport: minor cleanups
Edward Thomson c180c065 2014-07-09T17:58:39 Custom transport: minor cleanups * Move the transport registration mechanisms into a new header under 'sys/' because this is advanced stuff. * Remove the 'priority' argument from the registration as it adds unnecessary complexity. (Since transports cannot decline to operate, only the highest priority transport is ever executed.) Users who require per-priority transports can implement that in their custom transport themselves. * Simplify registration further by taking a scheme (eg "http") instead of a prefix (eg "http://").
Edward Thomson c8402334 2014-08-13T17:23:07 Don't include the unreadable tests on win32
Carlos Martín Nieto 9dac1f95 2014-08-09T10:56:50 config: a multiline var can start immediately In the check for multiline, we traverse the backslashes from the end backwards and int the end assert that we haven't gone past the beginning of the line. We make sure of this in the loop condition, but we also check in the return value. However, for certain configurations, a line in a multiline variable might be empty to aid formatting. In that case, 'end' == 'start', since we ended up looking at the first char which made it a multiline. There is no need for the (end > start) check in the return, since the loop guarantees we won't go further back than the first char in the line, and we do accept the first char to be the final backslash. This fixes #2483.
Rob Rix bbe13802 2014-06-12T14:19:34 Demonstrate a trailing slash failure. `git help ignore` has this to say about trailing slashes: > If the pattern ends with a slash, it is removed for the purpose of > the following description, but it would only find a match with a > directory. In other words, foo/ will match a directory foo and > paths underneath it, but will not match a regular file or a > symbolic link foo (this is consistent with the way how pathspec > works in general in Git). Sure enough, having manually performed the same steps as this test, `git status` tells us the following: # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: force.txt # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # ../.gitignore # child1/ # child2/ i.e. neither child1 nor child2 is ignored.
Carlos Martín Nieto aa5cdf63 2014-06-04T11:57:53 status: failing test with slash-star When writing 'bin/*' in the rules, this means we ignore very file inside bin/ individually, but do not ignore the directory itself. Thus the status listing should list both files under bin/, one untracked and one ignored.
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.
Vicent Marti 8f759ac0 2014-08-07T18:00:57 Merge pull request #2471 from jacquesg/compatibility-cleanup Compatibility/Portability cleanup
Jacques Germishuys c7dd0a56 2014-07-12T14:44:58 Use p_snprintf also in tests
Carlos Martín Nieto 7db0e6ee 2014-07-18T16:00:21 merge: expose multiple merge bases We always calculate multiple merge bases, but up to now we had only exposed the "best" merge base. Introduce git_oidarray which analogously to git_strarray lets us return multiple ids.
Vicent Marti 243db06c 2014-07-23T07:57:20 Merge pull request #2484 from libgit2/fix-git-status-list-new-unreadable-folder Fix git status list new unreadable folder
Edward Thomson 0ba4dca5 2014-07-22T10:40:23 git_cherry_pick -> git_cherrypick
Alan Rogers 7d0ab0fa 2014-07-22T15:08:24 Merge remote-tracking branch 'origin/master' into fix-git-status-list-new-unreadable-folder
Vicent Marti ec813d83 2014-07-16T13:07:17 Merge pull request #2476 from linquize/config-lf-eof When adding new config section, handle config file not ending with LF
Vicent Marti ed99e0b5 2014-07-16T13:00:15 Merge pull request #2467 from ethomson/win_local_clone Handle local file:/// paths on Windows
Linquize 69374869 2014-07-16T21:54:53 Add unit test to test add section without lf at EOF
Edward Thomson 3d997dc2 2014-07-15T10:00:46 Switch description and path reporting
Edward Thomson 529fd30d 2014-07-08T15:45:50 Handle local file:/// paths on Windows Windows can't handle a path like `/c:/foo`; when turning file:/// URIs into local paths, we must strip the leading slash.
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
Alan Rogers 4edd1a03 2014-07-10T19:17:34 Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder
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
Carlos Martín Nieto e26b08d3 2014-06-25T17:05:27 ssh: adjust clone and push test credentials to the split user+pass method For urls where we do not specify a username, we must handle the case where the ssh transport asks us for the username. Test also that switching username fails.
Carlos Martín Nieto ccb85c8f 2014-06-25T16:27:43 ssh: make sure to ask for a username and use the same one In order to know which authentication methods are supported/allowed by the ssh server, we need to send a NONE auth request, which needs a username associated with it. Most ssh server implementations do not allow switching the username between authentication attempts, which means we cannot use a dummy username and then switch. There are two ways around this. The first is to use a different connection, which an earlier commit implements, but this increases how long it takes to get set up, and without knowing the right username, we cannot guarantee that the list we get in response is the right one. The second is what's implemented here: if there is no username specified in the url, ask for it first. We can then ask for the list of auth methods and use the user's credentials in the same connection.
Carlos Martín Nieto d7f962f4 2014-06-16T19:30:06 ssh: request credentials again on authentication failure Instead of completely giving up on the first failure, ask for credentials as long as we fail to authenticate.
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 b529c5f9 2014-06-12T17:19:00 ssh: propagate the error code from the auth callback We need to be able to get a GIT_EUSER back through the outermost call.
Carlos Martín Nieto 22618906 2014-06-12T16:09:54 ssh: detect authentication methods Before calling the credentials callback, ask the sever which authentication methods it supports and report that to the user, instead of simply reporting everything that the transport supports. In case of an error, we do fall back to listing all of them.
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.
Alan Rogers dc49e1b5 2014-06-04T15:36:28 Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder Conflicts: include/git2/diff.h