Commit Graph

15532 Commits

Author SHA1 Message Date
Edward Thomson
fb1797de63 Merge remote-tracking branch 'origin/main' into libgit2-httpparser 2024-04-23 00:09:50 +01:00
Edward Thomson
15a8d8763e ci: make fedora a nightly build 2024-04-23 00:09:20 +01:00
Edward Thomson
64808a9a8e ci: fixes for fedora
Use fedora's valgrind instead of trying to build our own; omit false
positive leaks in getaddrinfo;
2024-04-23 00:07:48 +01:00
Edward Thomson
98c4955390 http: remove legacy bundled http-parser
Users can still use the legacy Node.js http-parser library, but now we
bundle llhttp and prefer it.
2024-04-22 22:21:23 +01:00
Edward Thomson
d02b549dab http: make llhttp the default 2024-04-22 22:21:23 +01:00
Edward Thomson
d396819101 http: abstract http parsing out of httpclient
Avoid #ifdef's in httpclient.c, and move http parsing into its own file.
2024-04-22 22:21:23 +01:00
Edward Thomson
3599de9073 http: add llhttp as a bundled dependency
Include llhttp as a bundled dependency with the aim to use it as our
default http parser, removing the now-unmaintained Node.js http-parser.
2024-04-22 22:21:23 +01:00
Edward Thomson
93c94446cd Merge pull request #6792 from barracuda156/apple
process.c: fix environ for macOS
2024-04-19 09:46:25 +01:00
Edward Thomson
9ddf612a00 Merge pull request #6788 from libgit2/ethomson/user_agent
Allow more control over the user-agent
2024-04-18 21:02:59 +01:00
Edward Thomson
72d36a42b6 Merge pull request #6794 from stinb/windows-arm-build
cmake: remove workaround that isn't compatible with Windows on ARM
2024-04-18 21:01:40 +01:00
Jason Haslam
387d01c186 cmake: remove workaround that isn't compatible with Windows on ARM 2024-04-10 21:29:54 -06:00
Sergey Fedorov
4b043541ab process.c: fix environ for macOS 2024-04-08 03:46:17 +08:00
Edward Thomson
8afdad0eb0 Merge pull request #6787 from libgit2/ethomson/docs
Docs meta-updates
2024-04-02 23:13:55 +01:00
Edward Thomson
cc2a01524d docs: document git_remote_capability_t 2024-04-02 22:14:51 +01:00
Edward Thomson
6122f008c6 docs: it's _return_ not _returns_ 2024-04-02 22:14:51 +01:00
Edward Thomson
6bed71e05d docs: update includes
Update our headers so that they can include the necessary definitions.
Docs generators (in particular, `clang -Xclang -ast-dump`) were unable
to see the necessary definitions.
2024-04-02 22:14:47 +01:00
Edward Thomson
4839f4fbfc http: allow users more control over user-agent
Users can now override the "product" portion of the user-agent (via
GIT_OPT_SET_USER_AGENT_PRODUCT). This continues to default to "git/2.0",
but users may define their own string, or may opt out of sending a
user-agent entirely (by passing an empty string). Similarly, users may
now also opt-out of sending any additional "comment" information by
setting the GIT_OPT_SET_USER_AGENT value to an empty string.
2024-03-28 10:10:50 +00:00
Edward Thomson
4d19e8c9c5 settings: pull settings out into its own file 2024-03-28 10:10:46 +00:00
Edward Thomson
4bb051adec Merge pull request #6782 from libgit2/ethomson/ci
ci: give all nightly builds a unique id
2024-03-26 21:12:06 +00:00
Edward Thomson
dd79fbb5ab ci: give all nightly builds a unique id
The new upload-artifact action fails on conflicting names; ensure that
we give each artifact a unique name (keyed off the id).
2024-03-26 20:56:07 +00:00
Edward Thomson
7f1a39e3b9 Merge pull request #6781 from Formkunft/fix-commit-create-from-stage
commit: Fix git_commit_create_from_stage without author and committer
2024-03-26 16:54:57 +00:00
Florian Pircher
34073bf2e5 commit: Fix git_commit_create_from_stage without author and committer 2024-03-24 23:24:31 +01:00
Edward Thomson
e2db98f891 Merge pull request #6773 from libgit2/ethomson/ci
ci: update nightly workflows
2024-03-22 10:44:36 +00:00
Edward Thomson
d74d491481 Merge pull request #6767 from libgit2/ethomson/v18
Release v1.8
v1.8.0
2024-03-20 20:19:37 +00:00
Edward Thomson
9b29a5d30d ci: update nightly workflows
Update the nightly and benchmark workflows to only run steps in
libgit2/libgit2 by default. Also update the benchmark workflow to use
the latest download-artifact version.
2024-03-20 09:26:32 +00:00
Edward Thomson
69f2577110 v1.8: update changelog 2024-03-20 08:21:43 +00:00
Edward Thomson
5aa3ce7225 v1.8: update version numbers 2024-03-20 08:19:09 +00:00
Edward Thomson
7940f094a5 v1.8: update COPYING file
Include the ntlmclient dependency's license file.
2024-03-20 08:19:09 +00:00
Edward Thomson
115db540cf Merge pull request #6772 from libgit2/ethomson/actions
ci: split SHA256 builds out into their own workflow
2024-03-19 07:42:23 +00:00
Edward Thomson
9288436e38 ci: split SHA256 builds out into their own workflow
Split the SHA256 builds into their own workflow; since they're
experimental (and have proven to be flaky) they shouldn't be used as
signal that there's a problem with a PR.
2024-03-19 07:01:01 +00:00
Edward Thomson
0f12a011ab Merge pull request #6770 from libgit2/ethomson/ctype
cast characters to unsigned when classifying characters
2024-03-18 11:31:39 +00:00
Edward Thomson
467556993f ntlmclient: use unsigned char for ctype functions 2024-03-18 11:07:47 +00:00
Edward Thomson
8e6beb3d16 ctype: switch to git__ ctype functions
Use the `git__` ctype functions (`git__isdigit` and friends) instead of
explicitly casting.
2024-03-18 11:07:47 +00:00
Edward Thomson
647f8eb987 ctype: only use custom functions on Windows
The Microsoft C runtime (MSVCRT) may take a heavy lock on the
locale in order to figure out how the `ctype` functions work.
This is deeply slow. Provide our own to avoid that.

On POSIX, provide emulation for that functionality using the ctype
functions, but compress the return value into a `bool`, and cast the
value to an `unsigned char`.
2024-03-18 11:07:47 +00:00
Edward Thomson
06c0ac658f Merge pull request #6769 from libgit2/ethomson/valgrind
valgrind: suppress OpenSSL warnings
2024-03-18 11:04:08 +00:00
Edward Thomson
4504f2c5cf valgrind: suppress OpenSSL warnings 2024-03-18 10:33:44 +00:00
Edward Thomson
a035aa4b97 Merge pull request #6768 from libgit2/ethomson/v18_fixes
Last minute fixes for v1.8
2024-03-18 06:49:40 +00:00
Edward Thomson
dd35af37d8 repository: rearrange git_repository_item_t values
Update the ordering of `GIT_REPOSITORY_ITEM_WORKTREE_CONFIG` to avoid
breaking the ABI unnecessarily.
2024-03-17 21:52:11 +00:00
Edward Thomson
2eb3fecd03 fetch: avoid API breaking-changes from v1.7
Update `git_fetch_options` to break out the fetch options into
individual options. This prevents creating an API breaking change from
v1.7.0. `git_remote_update_tips` retains the `update_flags` to also
avoid an API breaking change.
2024-03-17 21:26:27 +00:00
Edward Thomson
2fe50e295d Merge pull request #6766 from libgit2/ethomson/configfix
config: correct fetching the HIGHEST_LEVEL config
2024-03-17 14:32:21 +00:00
Edward Thomson
cc7764f6a6 config: correct fetching the HIGHEST_LEVEL config
Also, add a test for fetching the `GIT_CONFIG_HIGHEST_LEVEL`.
2024-03-17 14:11:40 +00:00
Edward Thomson
ecf2c64fb5 Merge pull request #6765 from libgit2/ethomson/actions
build: update to latest actions versions
2024-03-16 18:42:17 +00:00
Edward Thomson
58dfe647b7 build: update to latest actions versions 2024-03-16 18:17:16 +00:00
Edward Thomson
47b7d72d2c Merge pull request #6759 from adamharrison/PR/mbedtls3
Allow libgit2 to be compiled with mbedtls3.
2024-03-16 18:10:05 +00:00
Edward Thomson
c2ed49c78e Merge pull request #6756 from libgit2/ethomson/worktree-config
Separate config reader and writer backend priorities (for worktree configs)
2024-03-16 16:36:22 +00:00
Edward Thomson
3266fc4938 mbedtls: keep track of what we allocate, then free it
Instead of trying to allocate something, hand it to mbedTLS, and then
peer into its private data structures to try to free that thing... we
could just keep track of it ourselves.

Once we've done that, we needn't do an allocation _anyway_, we can just
keep it on the stack.
2024-03-16 15:52:46 +00:00
Edward Thomson
079861729b build: update ntlmclient dependency
The ntlmclient dependency now bundles an MD4 implementation for
compatibility with newer mbedTLS. Include that so that we can support
mbedTLS 3.
2024-03-16 14:32:54 +00:00
Edward Thomson
594063935b cli: use libgit2 system includes
libgit2 may adjust the system includes - for example, to locate a
dependency installed in a funny location. Ensure that the cli
understands those include paths as well.
2024-03-16 14:31:55 +00:00
Edward Thomson
844e7b3bbe Merge pull request #6762 from libgit2/ethomson/zlib
packbuilder: adjust nondeterministic tests
2024-03-16 14:22:44 +00:00
Edward Thomson
b70dd12706 packbuilder: adjust nondeterministic tests
The packbuilder tests should be deterministic. This comment suggests
that they are:

```
/*
 * By default, packfiles are created with only one thread.
 * Therefore we can predict the object ordering and make sure
 * we create exactly the same pack as git.git does when *not*
 * reusing existing deltas (as libgit2).
 *
 * $ cd tests/resources/testrepo.git
 * $ git rev-list --objects HEAD | \
 *  git pack-objects -q --no-reuse-delta --threads=1 pack
 * $ sha1sum pack-7f5fa362c664d68ba7221259be1cbd187434b2f0.pack
 * 5d410bdf97cf896f9007681b92868471d636954b
 *
 */
```

but it is disappointingly incorrect. As is evidenced by the fact that --
at least on _my_ machine -- that command does not actually produce that
output any longer.

Variations in things like the which compression library is actually
used, and its defaults, mean that we cannot accurately predict or
enforce the bytes in the packfile from one system to another.

Adjust the tests so that they do not believe that they should enforce
the bytes in the packfile. This allows broader compatibility with
zlib-compatible compression libraries, or other compression levels.
2024-03-16 12:19:16 +00:00