tests


Log

Author Commit Date CI Message
Carlos Martín Nieto 3f894205 2014-06-06T15:01:45 remote: allow overriding the refspecs for download and fetch With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
Edward Thomson 4c534892 2014-09-29T14:57:54 Merge pull request #2581 from jacquesg/stash-ignored-directories Stash ignored directories
Edward Thomson 89602a1a 2014-09-29T10:39:40 Merge pull request #2584 from jacquesg/pool-alignment Pool/Index data is not aligned
Edward Thomson ced843f4 2014-09-29T10:29:00 Merge pull request #2559 from libgit2/cmn/free-tls-error global: free the error message when exiting a thread
Jacques Germishuys 0478b7f4 2014-09-25T15:35:00 Silence unused return value warning
Jakub Čajka 7629ea5d 2014-06-11T16:00:04 Fixed odb foreach test failure for big-endian 64-bit
Jakub Čajka d99e5471 2014-06-11T09:37:15 Fixed merge REUC test for big-endian 64-bit
Jacques Germishuys 940da548 2014-09-24T13:24:06 Added test for stashing files in ignored directories
Vicent Marti 14556cbf 2014-09-17T17:13:25 Merge pull request #2567 from cirosantilli/factor-41 Factor 40 and 41 constants from source.
Vicent Marti 276d9ea3 2014-09-17T15:39:57 Merge pull request #2571 from libgit2/vmg/walk-up-path Fix `git_path_walk_up` to work with non-rooted paths
Vicent Marti 4592b62e 2014-09-17T15:26:48 Merge pull request #2572 from cirosantilli/factor-void Replace void casts with GIT_UNUSED.
Ciro Santilli c5cf8cad 2014-09-17T15:19:08 Replace void casts with GIT_UNUSED.
The rugged tests are fragile 4cb7c4a4 2014-09-17T15:08:16 attr: Add an extra test for files under a subfolder
The rugged tests are fragile bbb988a5 2014-09-17T14:52:31 path: Fix `git_path_walk_up` to work with non-rooted paths
Vicent Marti 1312f87b 2014-09-17T14:56:39 Merge pull request #2464 from libgit2/cmn/host-cert-info Provide a callback for certificate validation
Carlos Martín Nieto 25abbc27 2014-09-17T03:19:40 Clean up some leaks in the test suite
Ciro Santilli 1d20092c 2014-09-16T18:36:49 Remove unused buf variable from path/core test.
Carlos Martín Nieto 52e09724 2014-09-16T17:13:58 ssh: skip the localhost cert check earlier Skip it before we attempt to clone, as we would exit with -1 on systems which do not have sshd running.
Carlos Martín Nieto 1e0aa105 2014-09-16T03:22:09 ssh: expose both hashes The user may have the data hashed as MD5 or SHA-1, so we should provide both types for consumption.
Carlos Martín Nieto 286369a8 2014-09-16T02:27:16 ssh: provide our own types for host key lengths Instead of using the libssh2 defines, provide our own, which eases usage as we do not need to check whether libgit2 was built with libssh2 or not.
Carlos Martín Nieto 0782fc43 2014-09-16T01:47:30 net: use only structs to pass information about cert Instead of spreading the data in function arguments, some of which aren't used for ssh and having a struct only for ssh, use a struct for both, using a common parent to pass to the callback.
Carlos Martín Nieto 0fef3899 2014-09-16T01:25:53 Merge remote-tracking branch 'upstream/master' into cmn/host-cert-info
Carlos Martín Nieto bf8756d6 2014-09-15T21:51:42 ssh: add test for host key Test that the certificate check callback gets the right fingerprint from the host we're connecting to.
Carlos Martín Nieto 08545d36 2014-08-30T00:40:37 winhttp: credential check on successful connect On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
Carlos Martín Nieto 23ca0ad5 2014-08-29T21:25:13 Bring certificate check back to the normal return code Returning 0 lets the certificate check succeed. An error code is bubbled up to the user.
Carlos Martín Nieto 2f5864c5 2014-08-29T21:15:36 ssh: do ssh cert info before asking for credentials We know the host's key as soon as we connect, so we should perform the check as soon as we can, before we bother with the user's credentials.
Carlos Martín Nieto 17491f6e 2014-08-29T17:18:23 transport: always call the certificate check callback We should let the user decide whether to cancel the connection or not regardless of whether our checks have decided that the certificate is fine. We provide our own assessment to the callback to let the user fall back to our checks if they so desire.
Carlos Martín Nieto 85acc562 2014-08-29T17:07:07 remote: add tests for the certificate callback
Carlos Martín Nieto 9b940586 2014-07-04T12:45:43 Provide a callback for certificate validation If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
Vicent Marti 903a7616 2014-09-16T13:22:40 Merge pull request #2561 from jacquesg/merge-skip No files merged may result in bogus merge conflict error
Ciro Santilli 3b2cb2c9 2014-09-16T11:49:25 Factor 40 and 41 constants from source.
Russell Belfer 1fbeb2f0 2014-09-15T21:59:23 Fix attribute lookup in index for bare repos When using a bare repo with an index, libgit2 attempts to read files from the index. It caches those files based on the path to the file, specifically the path to the directory that contains the file. If there is no working directory, we use `git_path_dirname_r` to get the path to the containing directory. However, for the `.gitattributes` file in the root of the repository, this ends up normalizing the containing path to `"."` instead of the empty string and the lookup the `.gitattributes` data fails. This adds a test of attribute lookups on bare repos and also fixes the problem by simply rewriting `"."` to be `""`.
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 fdea219a 2014-09-10T18:28:19 global: free the error message when exiting a thread When we free the global state at thread termination, we must also free the error message in order not to leak the string once per thread.
Jacques Germishuys 493c340c 2014-09-12T21:59:09 Added test case to illustrate bogus conflicts detected if no files were merged, and untracked files exist in the workdir.
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