summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: validate host and port for ssh tests when non-standardEdward Thomson2023-02-241-1/+11
|
* tests: always unset HTTP_PROXY before starting testsEdward Thomson2023-02-231-21/+15
| | | | | | The remote::httpproxy::env test (correctly) reset the environment before running; however the other tests are also impacted by the environment and need to have it isolated.
* #6491: Sets oid_type on repos open with git_repository_open_bareMiguel Arroz2023-02-171-0/+3
|
* Merge pull request #6330 from gitkraken-jacobw/partial-stashingEdward Thomson2023-02-162-0/+42
|\ | | | | stash: partial stash specific files
| * stash: test save options initJacob Watson2022-07-141-0/+5
| |
| * stash: implement CI testingJacob Watson2022-07-141-0/+37
| |
* | tests: use static scope for test dataEdward Thomson2023-02-152-3/+3
| |
* | Merge pull request #6456 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-02-14143-92/+3764
|\ \ | | | | | | SHA256: more SHA256 support
| * | win32: adjust max path length for SHA256Edward Thomson2023-02-131-1/+1
| | | | | | | | | | | | | | | The longest path within a git repository is now a SHA256 format packfile. Adjust our max length checking to match.
| * | clone: support sha256Edward Thomson2023-02-123-12/+45
| | |
| * | object: lookup sha256 objectsEdward Thomson2023-02-128-59/+626
| | | | | | | | | | | | | | | This is much of the plumbing for the object database to support SHA256, and for objects to be able to parse SHA256 versions of themselves.
| * | odb: test sha256 pack backendEdward Thomson2023-02-122-0/+252
| | |
| * | packfile: handle sha256 packfilesEdward Thomson2023-02-127-3/+122
| | | | | | | | | | | | Teach the packfile machinery to cope with SHA256.
| * | odb: rename test file to avoid underscoreEdward Thomson2023-02-121-4/+4
| | | | | | | | | | | | | | | In clar, an underscore is meaningful; avoid using it incorrectly / unnecessarily.
| * | tests: add a sha256 repositoryEdward Thomson2023-02-12117-0/+2569
| | | | | | | | | | | | This is a conversion of the testrepo.git to SHA256 support.
| * | tests: helpers for getting ints from configurationEdward Thomson2023-02-122-0/+22
| | |
| * | repo: don't overwrite repo format version on reinitEdward Thomson2023-02-121-7/+26
| | | | | | | | | | | | | | | Ensure that we maintain the `core.repositoryFormatVersion` value instead of always overwriting it with the default.
| * | repo: understand the `objectformat` extensionEdward Thomson2023-02-122-6/+78
| | | | | | | | | | | | | | | | | | Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
| * | oid: provide type lookups by enum value or nameEdward Thomson2023-02-091-0/+19
| | |
* | | Merge pull request #6455 from libgit2/ethomson/sysdirEdward Thomson2023-02-1411-60/+260
|\ \ \ | | | | | | | | Support the notion of a home directory separately from global configuration directory
| * | | ci: run clone tests in onlineEdward Thomson2023-02-091-1/+1
| | | |
| * | | tests: known_hosts manipulating ssh clone testsEdward Thomson2023-02-091-22/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the clone tests how to clone from github.com, when given a keypair with a passphrase and known_hosts data. This allows us to better exercise our known_hosts checking and ensure that the lifecycle of the certificate callback matches our expectations.
| * | | tests: use a dummy homedirEdward Thomson2023-02-093-0/+20
| | | | | | | | | | | | | | | | | | | | Use a dummy home directory for tests to avoid user data leaking into test execution.
| * | | tests: configure temporary homedirs correctlyEdward Thomson2023-02-097-36/+98
| | | | | | | | | | | | | | | | | | | | | | | | Now that we've split the notion of the home directory from the global configuration store, our tests should use the appropriate one based on what they're doing.
| * | | sysdir: move windows sysdir functions out of shared utilEdward Thomson2023-02-091-1/+0
| |/ / | | | | | | | | | | | | | | | The windows sysdir functions are libgit2-specific and for git compatibility only; remove them from the shared util directory and bring them into the libgit2 source tree.
* | | Merge pull request #6423 from cavaquinho/fix/6422-revwalk_push_glob-dangling-refEdward Thomson2023-02-141-0/+17
|\ \ \ | | | | | | | | #6422: handle dangling symbolic refs gracefully
| * | | #6422: handle dangling symbolic refs gracefullyMiguel Arroz2022-11-031-0/+17
| | | |
* | | | Merge branch 'revparse'Edward Thomson2023-02-141-0/+3
|\ \ \ \
| * | | | Fix parsing rev with reflog of HEAD (e.g., HEAD@{3})Sven Strickroth2023-02-141-0/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | Fixes issue #6156. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | diff_file: don't mmap/readbuffer empty filesIliyas Jorio2023-02-131-0/+36
|/ / / | | | | | | | | | This prevents GIT_MMAP_VALIDATE from failing. This also prevents git_diff_file_content__unload from attempting to free git_str__initstr.
* | | clar: cross-platform elapsed time counterEdward Thomson2023-01-251-9/+37
| | | | | | | | | | | | | | | Abstract time counter for tests; use gettimeofday on Unix and GetTickCount on Windows.
* | | tests: fix clar declarationsEdward Thomson2023-01-251-6/+6
| | |
* | | tests: update clar test runnerEdward Thomson2023-01-254-42/+86
| | | | | | | | | | | | | | | Update to the latest main version of clar, which includes improved xml summary output.
* | | Merge pull request #6362 from sven-of-cord/mainEdward Thomson2023-01-201-5/+20
|\ \ \ | | | | | | | | push: revparse refspec source, so you can push things that are not refs
| * | | push: revparse refspec source, so you can push things that are not refsSven Over2022-07-201-5/+20
| | | | | | | | | | | | | | | | I want to push a commit by OID to a remote branch. Currently, push parses the refspecs such that the source must be the name of a ref (it uses git_reference_name_to_id to resolve it). This commit changes it so push uses git_revparse_single to resolve the source of the refspec. This allows for OIDs or other revs (e.g. `HEAD~2`) to be pushed.
* | | | Merge commit 'e33d7c068' into ssh_key_checkingEdward Thomson2023-01-201-2/+2
|\ \ \ \
| * | | | tests: move online::clone::ssh_auth_methods into the ssh test suiteCarlos Martín Nieto2022-11-041-2/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently running it as part of the online suite but that doesn't have any setup for ssh so we won't find the GitHub keys we set up during the test. It doesn't need the private key setup as we just want to make sure we see some auth request from the server, but with the addition of hostkey checking we're now seeing it fail when we skip these tests.
* | | | tests: Add new test to submodule::updatetagesuhu2022-11-251-0/+20
| | | | | | | | | | | | | | | | | | | | Verify that trying to update submodule which has been configured but not added does return an error. Issue #6433: git_submodule_update fails to update configured but missing submodule
* | | | Merge pull request #6326 from libgit2/ethomson/url_parseEdward Thomson2022-11-236-90/+320
|\ \ \ \ | | | | | | | | | | URL parsing for google-compatible URLs
| * | | | url: only allow @s in usernames for ssh urlsEdward Thomson2022-06-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce the RFC for other protocols; Google's questionable choices about malformed SSH protocols shouldn't impact our ability to properly parse HTTPS.
| * | | | url_parse: introduce our own url parsingEdward Thomson2022-06-171-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | Provide our own url parser, so that we can handle Google Code's "fun" URLs that have a userinfo with an `@` in it. :cry:
| * | | | url: test that we don't expand % encoding in pathsEdward Thomson2022-06-171-0/+12
| | | | |
| * | | | url: remove invalid scp url parsing testEdward Thomson2022-06-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The url::scp::invalid_addresses test attempts to test an invalid IPv6 address. It does not, it calls the regular URL parsing function which treats it like a possibly invalid scheme.
| * | | | net: move url tests into utilEdward Thomson2022-06-166-86/+86
| | | | |
* | | | | Add support for "safe.directory *"Sven Strickroth2022-11-191-0/+76
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | Merge pull request #6408 from kcsaul/fix-safe-directory-not-foundEdward Thomson2022-11-181-8/+8
|\ \ \ \ \ | | | | | | | | | | | | Ignore missing 'safe.directory' config during ownership checks
| * | | | | repo: test ownership validation fails with expected errorKevin Saul2022-10-011-8/+8
| | |/ / / | |/| | |
* | | | | commit-graph: only verify csum on git_commit_graph_open().Colin Stolley2022-11-031-0/+41
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is expensive to compute the sha1 of the entire commit-graph file each time we open it. Git only does this if it is re-writing the file. This patch will only verify the checksum when calling the external API git_commit_graph_open(), which explicitly says it opens and verifies the commit graph in the documentation. For internal library calls, we call git_commit_graph_get_file(), which mmaps the commit-graph file in read-only mode. Therefore it is safe to skip the validation check there. Tests were added to check that the validation works in the happy path, and prevents us from opening the file when validation fails. (Note from Derrick Stolee: This patch was applied internally at GitHub after we recognized the performance impact it had during an upgrade of libgit2. The original author left the company before we remembered to send it upstream.) Signed-off-by: Derrick Stolee <derrickstolee@github.com>
* | | | Merge pull request #6405 from libgit2/ethomson/experimentalEdward Thomson2022-09-212-7/+21
|\ \ \ \ | | | | | | | | | | Support non-cmake builds with an in-tree `experimental.h`
| * | | | tests: skip sha256 tests when not compiled inEdward Thomson2022-09-192-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Actually `cl_skip` the sha256 tests when we're not compiled for sha256, instead of passing them.