Commit Graph

15797 Commits

Author SHA1 Message Date
Edward Thomson
bef4b73871 transport: only clear data when not in rpc mode
In RPC mode (https), we need to resend the data so that the remote
endpoint keeps context. In non-RPC mode, we need not (and should not)
resend it. Clear that buffer data in non-RPC mode to prevent this.
2024-12-13 23:13:52 +00:00
lmcglash
eb84531575 Clear data after negotiation 2024-11-25 21:55:43 +00:00
Edward Thomson
c6111ec06c Merge pull request #6929 from lrm29/util_win32_rmdir_access_denied
util/win32: Continue if access is denied when deleting a folder.
2024-10-29 15:54:07 -04:00
Edward Thomson
b363ea4b9e Merge pull request #6932 from ajacoutot/openbsd-realpath 2024-10-27 10:40:33 +00:00
Antoine Jacoutot
d1f1e17404 realpath: unbreak build on OpenBSD 2024-10-27 09:47:31 +01:00
Laurence McGlashan
57ae4b11b6 util/win32: Continue if access is denied when deleting a folder. 2024-10-25 20:29:55 +01:00
Edward Thomson
a6ee48d4e3 Merge pull request #6926 from libgit2/ethomson/ci
ci: port latest fixes to nightlies
2024-10-23 16:18:04 +01:00
Edward Thomson
73ac58fb72 ci: port latest fixes to nightlies
We've made some changes to our CI builds; move them to nightlies.
2024-10-23 13:42:10 +01:00
Edward Thomson
8691f1ee16 Merge pull request #6925 from libgit2/ethomson/ossf_best_practices
readme: add OpenSSF best practices badge
2024-10-23 10:31:47 +01:00
Edward Thomson
95149d2c77 readme: add OpenSSF best practices badge 2024-10-23 10:30:20 +01:00
Edward Thomson
e3467ddb9d Merge pull request #6924 from libgit2/ethomson/cmake_deps
Improve dependency selection in CMake
2024-10-22 14:53:17 +01:00
Edward Thomson
95f47a3458 ci: update noble build
Ubuntu noble clang is now `clang-18`; update that, and update valgrind
to v3.23.0 so that clang compiles it properly.
2024-10-22 11:45:58 +01:00
Edward Thomson
13a326f4c1 ci: build and test with system http-parser 2024-10-22 11:45:58 +01:00
Edward Thomson
22ee5a59a2 docs: update README for dependency selection 2024-10-22 11:45:58 +01:00
Edward Thomson
d37d6a9f03 cmake: better document dependency options 2024-10-22 11:45:58 +01:00
Edward Thomson
e536b2c50c cmake: enforce USE_SHA1 and USE_SHA256 validity 2024-10-22 11:45:58 +01:00
Edward Thomson
d1d65787b4 cmake: enforce USE_HTTPS validity 2024-10-22 11:45:58 +01:00
Edward Thomson
2125e3c64d cmake: enforce USE_SSH validity
Validate the USE_SSH option fits into our valid options; don't
assume a default.
2024-10-22 11:13:43 +01:00
Edward Thomson
0c675b8c84 cmake: enforce USE_HTTP_PARSER validity
When `-DUSE_HTTP_PARSER=...` is specified, ensure that the specified
HTTP Parser is valid, do not fallback to builtin.

Restore `-DUSE_HTTP_PARSER=system` for backcompatibility.
2024-10-22 10:07:12 +01:00
Edward Thomson
533ec839bd Merge pull request #6920 from libgit2/ethomson/blame_benchmarks
Add benchmarks for blame
2024-10-21 22:22:41 +01:00
Edward Thomson
e68d0b4b95 benchmark: skip (don't fail) needs_repo tests
If a test needs a repo that isn't provide it, mark it as skipped and
avoid failing the execution.
2024-10-21 17:29:52 +01:00
Edward Thomson
d4222f8321 ci: don't run blame on torvalds/linux (yet)
blame on torvalds/linux is too punishing for our current implementation;
don't run it (yet).
2024-10-21 16:28:35 +01:00
Edward Thomson
df3d8a6799 ci: allow inputs to benchmark 2024-10-21 15:15:41 +01:00
Edward Thomson
229181bf9b Merge pull request #6919 from libgit2/ethomson/sha256_ci
ci: don't run Windows SHA256 gitdaemon tests
2024-10-21 15:06:37 +01:00
Edward Thomson
90e659d0b9 ci: only publish benchmarks nightly
Allow for workflow_dispatch jobs to run, but don't publish their test
results; this is useful for testing workflows themselves.
2024-10-21 15:03:14 +01:00
Edward Thomson
4f40bd9f09 benchmark: show helpful errors w/o local repo
When running without a local test repository, show a helpful error
message.
2024-10-21 15:03:14 +01:00
Edward Thomson
d564cc1801 benchmark: don't require a default
It will never be a good user experience to clone the git or kernel repos
from a remote; don't even have a default.
2024-10-21 15:03:14 +01:00
Edward Thomson
03d61cf321 benchmarks: add blame benchmarks 2024-10-21 15:03:14 +01:00
Edward Thomson
42bd9df2b4 benchmarks: pre-clone git and linux in ci 2024-10-21 15:03:14 +01:00
Edward Thomson
0dfcb29da2 benchmarks: clone git or kernel repositories
Teach the benchmark script how to clone the git or kernel repositories,
which is useful to have a larger corpus of test data. If a benchmark
script wants to `clone git` or `clone linux`, then this will be done.
Callers probably want to specify `BENCHMARK_GIT_REPOSITORY` to a
previously cloned local repository so that the script does not download
the repository repeatedly.
2024-10-21 15:03:14 +01:00
Edward Thomson
fddb0bb153 benchmarks: pass options on beyond -- 2024-10-21 15:03:14 +01:00
Edward Thomson
3ba218c4d5 cli: add a --no-pager option (currently a noop)
Add a `--no-pager` option for git compatibility.
2024-10-21 15:03:14 +01:00
Edward Thomson
da6b76d89e cli: refactor common options
Move the common option information to a global place, and reuse them.
Common options will be global variables.

Specify them as _hidden_ for all commands (the main command will pass
the SHOW_HIDDEN flag to the usage printer, so that they're visible).
2024-10-21 15:03:11 +01:00
Edward Thomson
fe66d93b0e cli: reorder arguments for help invocation
When the `help` command is invoked (because no command was specified) we
may need to clean up the arguments, in particular, to avoid passing
`--help` (so that the help command isn't confused, and assumes that it's
being invoked as `help --help`).
2024-10-21 15:02:05 +01:00
Edward Thomson
e1d44d9834 cli: optionally show hidden options in usage
Callers may wish to show all the options, even hidden ones, when showing
usage. In particular, showing generic help for the CLI should show
global options (those that are generally "hidden"). But showing help for
a particular command should keep them hidden. Instrument a mechanism to
deal with this.
2024-10-21 15:00:05 +01:00
Edward Thomson
0e08b58aed ci: don't run Windows SHA256 gitdaemon tests 2024-10-21 14:46:19 +01:00
Edward Thomson
7e3535cf4b Merge pull request #6906 from marcind-dot/add-OpenSSL-FIPS-cmake-flag 2024-10-21 10:19:51 +01:00
Edward Thomson
cd9f463294 Merge pull request #6914 from libgit2/ethomson/cmake
cmake-standard c standards
2024-10-20 23:17:32 +01:00
Edward Thomson
045534669d Merge pull request #6916 from libgit2/ethomson/ci
ci: don't run Windows SHA256 gitdaemon tests
2024-10-20 10:12:33 +01:00
Edward Thomson
500796a358 ci: don't run Windows SHA256 gitdaemon tests
The Windows SHA256 gitdaemon seems to crash; remove from CI while we
troubleshoot.
2024-10-20 09:49:45 +01:00
Edward Thomson
5caa45484e Merge pull request #6915 from libgit2/ethomson/cmake-python
cmake: update python locator
2024-10-20 07:19:50 +01:00
Edward Thomson
97734321e6 cmake: set Python policy to avoid warning
cmake warns us that we are using a deprecated python module; explicitly
accept that deprecation until they remove it entirely.
2024-10-20 01:08:19 +01:00
Edward Thomson
1692d30809 Merge pull request #6559 from libgit2/ethomson/update_tips_spec
remote: add update_refs with git_refspec
2024-10-20 00:04:52 +01:00
Edward Thomson
68bffe4755 Merge pull request #6037 from libgit2/ethomson/checkout_safety
checkout: make safe checkout the default
2024-10-20 00:04:23 +01:00
Edward Thomson
c1b2b25ebc remote: add update_refs callback
Add an `update_refs` callback that includes the refspec; `update_tips`
is retained for backward compatibility.
2024-10-19 23:42:26 +01:00
Edward Thomson
69555048fd clone: refactor to pass clone options around
Instead of dealing with the clone options sub-options (fetch, checkout,
etc) individually, treat them as a cohesive whole when passing them
throughout the system.

Additionally, move some functions around within the file to avoid
unnecessary decls at the top of the file.  And change a function
signature to avoid conflating truth with error.
2024-10-19 23:01:35 +01:00
Edward Thomson
933b62eedf checkout: make safe checkout the default
Make `GIT_CHECKOUT_SAFE` the default.  `NONE` is never what the user
wants _by default_; people expect checkout to, well, check things out.
Instead, it should be an opt-in "dry run" mode.

This removes some odd code in internal callers of `checkout` that takes
a `git_checkout_options` and updates the mode to `SAFE`.  This is now
unnecessary since everything has better defaults.
2024-10-19 23:01:35 +01:00
Edward Thomson
0013a6f9b2 cmake: default to c99 on android 2024-10-19 18:19:38 +01:00
Edward Thomson
7db332022b llhttp: use c-style comments 2024-10-19 14:29:57 +01:00
Edward Thomson
9c3fb6f85b tests: init clone options the proper way 2024-10-19 13:21:54 +01:00