summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: convert PATH correctly to Cygwin format on Windowsethomson/sysdir_testEdward Thomson2023-02-092-4/+28
| | | | | | | | | | | | | | | | | | We provide `BUILD_PATH` to our build script; provide it and mutate `PATH` when running our tests as well. We were previously using `cygpath` to try to convert a _list_ of Windows paths into cygwin / Unix style `PATH` format. This does not work -- it treats the path list as a single path (with semicolons -- understandably as those are allowed characters in a Windows path). For example, `C:\One;C:\Two;C:\Three` is converted to `/c/one;c:/two;c:/three`. Add a new function to convert path lists, so that paths are split by semicolon and fed to `cygpath` independently, then re-joined with a colon. This means that our example `C:\One;C:\Two;C:\Three` is correctly converted to `/c/one:/c/two:/c/three`.
* ci: limit test runner to build pathEdward Thomson2023-02-091-2/+20
| | | | | We provide `BUILD_PATH` to our build script; provide it and mutate `PATH` when running our tests as well.
* ci: run clone tests in onlineEdward Thomson2023-02-091-1/+1
|
* tests: known_hosts manipulating ssh clone testsEdward Thomson2023-02-092-22/+145
| | | | | | | 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.
* ci: compile against libssh2 on windowsEdward Thomson2023-02-092-2/+35
|
* ci: use latest ci-dependencies release for mingwEdward Thomson2023-02-091-2/+2
|
* ci: isolate the home directory for test executionEdward Thomson2023-02-091-1/+3
| | | | | | | libgit2 can now isolate its home directory, and our test runner (by default) isolates the home directory. In our CI environment, we want to set up some pieces (like ssh configuration) in a fake homedir. Continue to do so and propagate that to clar.
* 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.
* core: allow users to configure home directoryEdward Thomson2023-02-092-1/+32
| | | | | | | | | | Some callers -- like our test suite and the test suites of our language bindings -- want to isolate the home directory to avoid accidentally including the executing user's actual home directory data. Previously, we combined the notion of a home directory and global configuration -- now that this is separated, we provide users the ability to configure both.
* config: use home directory for `~` includesEdward Thomson2023-02-092-3/+3
| | | | | | | | Users can specify a config file to be included in the home directory using `~/filename` syntax. Instead of looking in the global configuration location (which may be overridden), use the user's _actual_ home directory. This allows callers to change the global configuration location separately from the home directory.
* attr: use home directory for `~` includesEdward Thomson2023-02-091-1/+1
| | | | | | | | Users can specify an attribute file to be included in the home directory using `~/filename` syntax. Instead of looking in the global configuration location (which may be overridden), use the user's _actual_ home directory. This allows callers to change the global configuration location separately from the home directory.
* ssh: give a realistic error messageEdward Thomson2023-02-091-2/+2
| | | | | I spent an hour banging my head against this, when it was because the remote didn't trust my key.
* ssh: support windows `known_hosts` filesEdward Thomson2023-02-091-8/+8
| | | | | | | Use `git_sysdir_find_homedir_file` to identify the path to the home directory's `.ssh/known_hosts`; this takes Windows paths into account by preferring `HOME`, then falling back to `HOMEPATH` and `USERPROFILE` directories.
* sysdir: provide actual home directoryEdward Thomson2023-02-092-10/+58
| | | | | | | | | | Provide a mechanism to look up the user's home directory, using the same mechanism that we use for locating the global configuration path (a fancy name for saying "the home directory"). SSH known hosts lookups now use this, instead of simply looking at the HOME environment variable, to support Windows-style home directory lookups in `HOME`, `HOMEPATH`, or `USERPROFILE`.
* sysdir: move windows sysdir functions out of shared utilEdward Thomson2023-02-096-318/+275
| | | | | | 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 #6464 from libgit2/ethomson/openssl3Edward Thomson2023-02-032-0/+4
|\ | | | | Support OpenSSL3: add OpenSSL deprection warning compatibility flag
| * Add OpenSSL deprection warningEdward Thomson2023-02-022-0/+4
|/ | | | | Add `OPENSSL_API_COMPAT=0x10100000L` since we use the now-deprecated low-level hash functions.
* Merge pull request #6444 from abizjak/mainEdward Thomson2023-01-261-1/+1
|\
| * Use `git_clone__submodule` to avoid file checks in workdirAleš Bizjak2023-01-051-1/+1
| | | | | | | | | | | | | | `git_clone` checks for existence of (non-empty) directories that would clash with what is about to be cloned. This is problematic when cloning submodules since they make sense in the context of a parent module, so they should not use the current working dir. Since in `git_submodule_update` we clone the submodule only when it is not yet initialized we do not need to perform directory checks.
* | Merge pull request #6460 from libgit2/ethomson/clar_updateEdward Thomson2023-01-251-2/+3
|\ \ | | | | | | ci: always create test summaries, even on failure
| * | ci: upgrade test-summary actionEdward Thomson2023-01-251-1/+1
| | |
| * | ci: update upload-artifact dependencyEdward Thomson2023-01-251-1/+1
| | |
| * | ci: always create test summaries, even on failureEdward Thomson2023-01-251-0/+1
|/ / | | | | | | | | When the dependent jobs fail -- possibly due to test failures -- we should still produce the job summary that shows those test failures.
* | Merge pull request #6459 from libgit2/ethomson/clar_updateEdward Thomson2023-01-254-37/+109
|\ \ | | | | | | tests: update clar test runner
| * | 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 #6458 from 0-wiz-0/netbsdEdward Thomson2023-01-241-112/+0
|\ \ | | | | | | src: hide unused hmac() prototype
| * | hash: drop all declarations from hmacEdward Thomson2023-01-241-114/+0
| | | | | | | | | | | | | | | | | | | | | The builtin hash uses the code verbatim from rfc6234, including prototypes for functions that we don't use (like hmac). Remove all unused prototypes to avoid collisions with things that an operating system might provide (like hmac).
| * | src: hide unused hmac() prototypeThomas Klausner2023-01-241-0/+2
|/ / | | | | | | | | | | It conflicts with NetBSD's in its libc. Closes #6457
* | Merge pull request #6452 from libgit2/ethomson/oid_warningEdward Thomson2023-01-201-1/+1
|\ \ | | | | | | push: use resolved oid as the source
| * | push: use resolved oid as the sourceEdward Thomson2023-01-201-1/+1
|/ / | | | | | | | | 211c97195e2ebcf68e27782715eb756823ad5a91 attempts to use the parsed OID but inverted the arguments to `git_oid_cpy`.
* | Merge pull request #6362 from sven-of-cord/mainEdward Thomson2023-01-202-8/+30
|\ \ | | | | | | 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-202-8/+30
| | | | | | | | | | | | 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 pull request #6432 from libgit2/ethomson/noop_argsEdward Thomson2023-01-202-19/+21
|\ \ \ | | | | | | | | thread: avoid warnings when building without threads
| * | | thread: avoid warnings when building without threadsEdward Thomson2022-11-232-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | `git__noop` takes no arguments, so a simple `#define func(a) git__noop` will produce warnings about the unused `a`. Introduce `git__noop_args` to swallow arguments and avoid that warning.
* | | | Merge pull request #6435 from russell/capabilities-typoEdward Thomson2023-01-201-2/+2
|\ \ \ \ | | | | | | | | | | transport: fix capabilities calculation
| * | | | transport: fix capabilities calculationRussell Sim2022-11-251-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This looks like a typo to me, from what i can see these lines were added at the same time and because of how capabilities are calculated, it's likely that this code will work in situations where these capabilities were the last ones.
* | | | Merge pull request #6448 from libgit2/ethomson/action_versionsEdward Thomson2023-01-203-9/+9
|\ \ \ \ | | | | | | | | | | ci: update version numbers of actions
| * | | | ci: update version numbers of actionsEdward Thomson2023-01-203-9/+9
| | | | |
* | | | | Merge commit 'e33d7c068' into ssh_key_checkingEdward Thomson2023-01-203-93/+333
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | ssh: look for a key in known_hosts to set the key type for the handshakeCarlos Martín Nieto2022-11-041-53/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The server and client negotiate a single hostkey, but the "best" cipher may not be the one for which we have an entry in `known_hosts`. This can lead to us not finding the key in known_hosts even though we should be connecting. Instead here we look up the hostname with a nonsense key to perform a lookup in the known hosts and set that. This is roughly what the OpenSSH client does as well.
| * | | | 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: append the github.com ssh keys so we have access during testsCarlos Martín Nieto2022-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently just the one test needs it. The ssh-rsa makes sure we're asking for the cipher we find in `known_hosts` as that won't be the one selected by default. This will be relevant in later changes.
| * | | | ssh: verify the remote's host key against known_hosts if it existsCarlos Martín Nieto2022-11-021-87/+222
| | | | | | | | | | | | | | | | | | | | | | | | | It turns out this has been available in libssh2 for a long time and we should have been verifying this the whole time.
* | | | | README: show v1.5 and v1.4 branch buildsEdward Thomson2023-01-201-1/+1
| |_|_|/ |/| | |
* | | | Merge pull request #6434 from tagesuhu/mainEdward Thomson2022-11-282-1/+25
|\ \ \ \ | |_|/ / |/| | | Fixes #6433: git_submodule_update fails to update configured but missing submodule
| * | | submodule: Do not try to update a missing submoduletagesuhu2022-11-251-1/+5
| | | | | | | | | | | | | | | | | | | | If a submodule has been configured but not yet added, do not try to update it. Issue #6433: git_submodule_update fails to update configured but missing submodule
| * | | 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