Commit Graph

15616 Commits

Author SHA1 Message Date
Edward Thomson
9e0511b548 test fixups 2024-09-06 20:17:28 +01:00
Patrick Steinhardt
fd34fd6f6e tests: reftable tests
Modify most of our existing refs tests to run with both filesystem-based
references and reftables. This is done by adding two new test repos
which are equivalent to our "normal" bare and non-bare testrepos, except
they use reftables as reference backend.
2024-09-06 11:59:28 +01:00
Patrick Steinhardt
12d0a64174 refdb: wire up reftable backend
In order to support multiple different reference backend
implementations, git-core introduced a new "refStorage" extension that
stores the reference storage format a git client should try to use.
Let's wire up this extension for the reftable backend and allocate
different reference database backends depending on its value.
2024-09-06 11:59:28 +01:00
Patrick Steinhardt
8dc19326f4 refdb: implement reftable backend 2024-09-06 11:59:28 +01:00
Patrick Steinhardt
dbd9c97106 deps: import reftable library
Import the reftable library from commit 994cc2f (C: formatting tweaks,
2020-06-29). This is an exact copy of the reftable library, excluding
the test framework and replacing the build system with CMake.
2024-09-06 11:59:28 +01:00
Edward Thomson
99d4427643 deps: zlib: update cmake
Modernize the zlib cmake a bit
2024-09-06 11:59:28 +01:00
Edward Thomson
d1235bcbb6 deps: zlib: update to v1.3.1 2024-09-06 11:59:28 +01:00
Patrick Steinhardt
b960b03b77 deps: zlib: add compress implementation
The reftable implementation makes use of compress2 to compress blocks,
but our bundled version of zlib doesn't include that file right now.
Let's add it to unblock the reftable dependency.
2024-09-06 11:59:28 +01:00
Edward Thomson
e0918d7ced repo: extensions are case insensitive 2024-09-06 11:59:28 +01:00
Edward Thomson
403a03b3be Merge pull request #6870 from civodul/fix-uninitialized-http-parser-proxy-settings
http: Initialize ‘on_status’ when using the http-parser backend.
2024-09-03 22:15:19 +01:00
Edward Thomson
637d2499d7 Merge pull request #6860 from Kyle-Ye/optimize/readme
Update README.md
2024-09-03 22:10:31 +01:00
Ludovic Courtès
e3597e9ff5 Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@edwardthomson.com>
2024-08-29 20:38:55 +00:00
Ludovic Courtès
ea7e18eef5 http: Initialize ‘on_status’ when using the http-parser backend.
Fixes a bug likely introduced in
d396819101 (in 1.8.1) whereby
‘proxy_settings.on_status’ would be left uninitialized when using the
‘http-parser’ backend, eventually leading to a segfault in
‘http_parser_execute’.  Valgrind would report use of the uninitialized
value like so:

   Conditional jump or move depends on uninitialised value(s)
      at 0x50CD533: http_parser_execute (http_parser.c:910)
      by 0x4928504: git_http_parser_execute (httpparser.c:82)
      by 0x4925C42: client_read_and_parse (httpclient.c:1178)
      by 0x4926F27: git_http_client_read_response (httpclient.c:1458)
      by 0x49255FE: http_stream_read (http.c:427)
      by 0x4929B90: git_smart__recv (smart.c:29)
      by 0x492C147: git_smart__store_refs (smart_protocol.c:58)
      by 0x4929F6C: git_smart__connect (smart.c:171)
      by 0x4904DCE: git_remote_connect_ext (remote.c:963)
      by 0x48A15D2: clone_into (clone.c:449)
      by 0x48A15D2: git__clone (clone.c:546)
      by 0x4010E9: main (libgit2-proxy.c:20)
2024-08-29 12:23:04 +02:00
Edward Thomson
782e29c906 ci: only publish benchmarks from libgit2/libgit2
Benchmark runs are trying to be pushed from repos that _aren't_
libgit2/libgit2. Try again with the syntax.
2024-08-22 13:10:29 +01:00
Kyle
c48536607a Update macOS section of README.md 2024-08-17 17:20:38 +08:00
Kyle
30f92e8345 Fix small issue on README 2024-08-17 17:14:40 +08:00
Edward Thomson
4d38f13619 Merge pull request #6859 from Kyle-Ye/patch-1 2024-08-16 12:09:42 +01:00
Kyle
ed520ff805 Fix contradictory phrase in SECURITY.md 2024-08-16 16:41:17 +08:00
Edward Thomson
503b66cf00 Merge pull request #6853 from BenJam/patch-1
Create FUNDING.json
2024-07-17 10:40:36 +01:00
Benjamin Nickolls
3f6177e634 Create FUNDING.json
Add Open Source Collective-owned wallet address to claim project on Drips
2024-07-17 10:38:12 +01:00
Edward Thomson
2ecc8586f7 Merge pull request #6851 from libgit2/ethomson/url_ports 2024-07-13 16:37:11 +01:00
Edward Thomson
d58db64bc1 Merge pull request #6842 from anatol/main
Headers cleanup
2024-07-12 15:11:31 +01:00
Edward Thomson
eebaa36f73 url: track whether url explicitly specified a port
When parsing URLs, track whether the port number was explicitly
specified or not. We track this separately from whether the port is the
_default_ port. This is so that we can discern between URLs that have
the default port explicitly specified or not.

For example: scp://host:22/foo and scp://host/foo are equivalent in
terms of functionality, but are not semantically equivalent.

A user might wish to specify scp://host:22/foo in order to explicitly
ensure that we connect on port 22, which might override (for example) a
different configuration option.
2024-07-11 11:13:20 +01:00
Anatol Pomozov
1f83c4652c Remove duplicating declaration of git_email_create_from_diff()
Exactly the same function already declared in include/git2/email.h
2024-07-10 17:16:32 -07:00
Anatol Pomozov
0c39ee1b1f Use typedef type for git_odb
This makes the function signature consistent with other cases
2024-07-10 17:14:09 -07:00
Edward Thomson
53c5cdbcf5 Merge pull request #6839 from thymusvulgaris/examples-build-documentation
docs: Add instructions to build examples
2024-07-10 08:32:08 +01:00
Edward Thomson
f3518eee26 Merge pull request #6706 from u-quark/signature-use-env-vars
Use environment variables when creating signatures
2024-07-10 08:31:15 +01:00
Edward Thomson
827573abc0 Merge pull request #6834 from csware/limit-attr
Limit .gitattributes and .gitignore files to 100 MiB
2024-07-10 08:30:21 +01:00
Edward Thomson
db5b9f5fb6 Merge pull request #6846 from kcsaul/fix/setup_shallow_roots
Fix shallow root maintenance during fetch
2024-07-10 08:27:28 +01:00
Kevin Saul
9e40c1390c smart: fix shallow roots setup 2024-07-09 23:25:10 +12:00
thymusvulgaris
febc6558fe docs: Add instructions to build examples
To build the examples, they must be included in the main build
using the following command:

    cmake -DBUILD_EXAMPLES=True ..
2024-06-28 13:56:35 +01:00
Edward Thomson
585210ab21 Merge pull request #6836 from gensmusic/main
odb: conditional git_hash_ctx_cleanup in git_odb_stream
2024-06-25 11:49:28 +01:00
Edward Thomson
bfe5cb50fd Merge pull request #6837 from ehuss/stream_read_return_docs
Fix docs for git_odb_stream_read return value.
2024-06-25 10:48:17 +01:00
Eric Huss
ca1e3dbb06 Fix docs for git_odb_stream_read return value. 2024-06-22 12:59:37 -07:00
gensmusic
c3e76dd2f6 odb: conditional git_hash_ctx_cleanup in git_odb_stream
When `git_odb_stream` is a read stream, `hash_ctx` is not used.
Therefore, check if `hash_ctx` can be freed during the release.
This allows implementers of custom ODB backends to not worry about
the creation of `hash_ctx` for now.
2024-06-22 09:34:11 +08:00
Sven Strickroth
b85848e81e Limit .gitattributes and .gitignore files to 100 MiB
Git introduced this 100 MiB limit in commits 3c50032ff528 (attr: ignore
overly large gitattributes files, 2022-12-01) and e7c3d1ddba0b (dir.c:
reduce max pattern file size to 100MB, 2024-06-05).

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2024-06-17 19:24:15 +02:00
Edward Thomson
649ef1cca6 signature: add git_signature_default_from_env
People who are doing a commit expect a unified timestamp between
author and committer information when we're using the current timestamp.
Provide a single function that returns both author and committer
information so that they can have an identical timestamp when none is
specified in the environment.
2024-06-14 14:55:37 +02:00
Edward Thomson
24d9fe1339 signature: keep using signature_default internally
Making the various pieces that create commits automatically (eg, rebase)
start paying attention to the environment variables is a Big Change.
For now, this is a big change in defaults; we should treat it as
breaking. We don't move to this by default; we may add `from_env` or
`honor_env` type of API surface in the future.
2024-06-14 12:49:09 +02:00
Edward Thomson
4ce872a0fd Merge pull request #6830 from libgit2/ethomson/v1.8.2
libgit2 v1.8.2
v1.8.2-rc1 v1.8.2
2024-06-14 00:15:19 +02:00
Edward Thomson
e9d56b0b14 v1.8.2: update version numbers 2024-06-13 19:43:46 +02:00
Edward Thomson
48b63274ea v1.8.2: update changelog 2024-06-13 19:42:55 +02:00
Edward Thomson
4516ca1497 Merge pull request #6829 from libgit2/ethomson/fix_constness
Fix constness issue introduced in #6716
2024-06-13 15:44:32 +02:00
Edward Thomson
93cb09f289 Merge pull request #6816 from libgit2/ethomson/readme
README: add experimental builds to ci table
2024-06-13 15:23:53 +02:00
Edward Thomson
49d3fadfca Revert "commit: fix const declaration"
This reverts commit cf19ddc522, which
was breaking for several projects.
2024-06-13 15:20:40 +02:00
Edward Thomson
6c5520f334 Merge pull request #6811 from libgit2/ethomson/test_allocator
Introduce a stricter debugging allocator for testing
2024-05-16 11:34:07 +01:00
Edward Thomson
ee552697d5 README: update build badges and links
Use new-style links to the build information and badges, which link to the workflow filename, not the display name.
2024-05-16 11:18:41 +01:00
Edward Thomson
36f7e21ad7 Merge pull request #6817 from libgit2/ethomson/v1.8.1
libgit2 v1.8.1
v1.8.1
2024-05-16 10:58:48 +01:00
Edward Thomson
ae65dac85e v1.8.1: update changelog 2024-05-16 00:49:46 +01:00
Edward Thomson
834ec0f52f v1.8.1: update version numbers 2024-05-16 00:49:40 +01:00
Edward Thomson
0dab9d4a57 README: add experimental builds to ci table 2024-05-15 23:11:07 +01:00