Commit Graph

16011 Commits

Author SHA1 Message Date
Edward Thomson
0738b054d3 commit_graph: add opts to open function
Provide an options structure to commit graph opening. This allows us to
specify information (like OID type) during opening.
2024-12-18 16:27:46 +00:00
Edward Thomson
54d666e5f7 commit_graph: move opts to new function
Instead of making the commit and dump functions take individual options
structures; provide the options structure to the writer creator. This
allows us to add additional information (like OID type) during
generation.
2024-12-18 16:27:46 +00:00
Edward Thomson
622035e6ad repo: take an options structure for repository_new
Future-proof the SHA256-ification of `git_repository_new` by taking an
options structure instead of an oid type.
2024-12-18 16:27:46 +00:00
Edward Thomson
43c31ecc42 repo: don't require oid_type to wrap_odb
The `wrap_odb` function doesn't need to know the OID types in the object
database; the object database already knows the type.
2024-12-18 16:27:46 +00:00
Edward Thomson
cefcabfcc1 repo: specify odb options to odb_wrap
odb wrapping
2024-12-18 16:27:46 +00:00
Edward Thomson
9aa5faa38b indexer: move oid_type into the opts structure
Object ID type should be an option within the options structure; move it
there.
2024-12-18 16:27:46 +00:00
Edward Thomson
708d64f1e8 index: provide a index_options structure when opening
Instead of simply taking the oid type, future-proof our index opening
and creation functionality by taking an options structure.
2024-12-18 16:12:21 +00:00
Ryan Pham
f7f30ec136 remote: Handle fetching negative refspecs
Add support for fetching with negative refspecs. Fetching from the
remote with a negative refspec will now validate any references fetched
do not match _any_ negative refspecs and at least one non-negative
refspec. As we must ensure that fetched references do not match any of
the negative refspecs provided, we cannot short-circuit when checking
for matching refspecs.
2024-12-17 09:23:31 +09:00
Ryan Pham
3d9f4061ca refspec: Add func to distinguish negative refspecs
Negative refspecs were added in Git v2.29.0 and are denoted by prefixing
a refspec with a caret. This adds a way to distinguish if a refspec is
negative and match negative refspecs.
2024-12-17 09:23:28 +09:00
Edward Thomson
009677e611 oid: provide private type_is_valid functionality
As users begin to specify the object ID types, provide an internal
mechanism to determine whether the type is valid / supported or not.
2024-12-16 17:15:27 +00:00
Edward Thomson
3251d1bb62 Merge pull request #6961 from libgit2/ethomson/changelog
Update changelog with v1.8.4 content
2024-12-16 11:10:58 +00:00
Edward Thomson
5576e8f6a9 docs: add "benchmarks" section to changelog 2024-12-16 10:56:31 +00:00
Edward Thomson
ab0e1606b4 docs: include v1.8.4 changelog 2024-12-16 10:56:31 +00:00
Edward Thomson
0c48276448 Merge pull request #6960 from libgit2/ethomson/tls
TLS: v1.2 and updated cipher list
2024-12-16 10:39:23 +00:00
Edward Thomson
e014b10e78 security: improve the default TLS ciphers
Update our default cipher list to the most recent "intermediate"
configuration from Mozilla's SSL cipher list, which is "recommended
cnofiguration for a general-purpose server".

https://wiki.mozilla.org/Security/Server_Side_TLS

This removes many outdated ciphers that are no longer practically
supported by servers, including GitHub, GitLab, and Bitbucket.
2024-12-16 10:07:10 +00:00
Edward Thomson
833224964a security: require TLSv1.2 or higher 2024-12-16 10:03:54 +00:00
Edward Thomson
8049f00e3b Merge remote-tracking branch 'origin/main' into ssh 2024-12-13 23:32:32 +00:00
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
Edward Thomson
c642ef9d4c Merge pull request #6959 from libgit2/ethomson/pathspec_tests
pathspec: additional pathspec wildcard tests
2024-12-13 22:49:57 +00:00
Edward Thomson
0bb7d45897 Merge pull request #6944 from mathworks/pr_6724
object: git_object_short_id fails with core.abbrev string values
2024-12-12 16:09:41 +00:00
lmcglash
d363cc8fee Apply PR feedback. 2024-12-11 19:55:54 +00:00
Edward Thomson
8ad1eb9c72 Merge pull request #6958 from libgit2/ethomson/init-docs
docs: remind people about `git_libgit2_init`
2024-12-11 12:40:29 +00:00
Edward Thomson
48820e6c74 pathspec: additional pathspec wildcard tests
We did not have (obvious) pathspec wildcard tests for `**/foo` behavior.
Add some based on git's observed behavior.
2024-12-11 10:58:03 +00:00
Edward Thomson
f675ea3cd7 docs: remind people about git_libgit2_init
Currently `git_libgit2_init` must be called before you can work with the
library. Remind people about this as they read the documentation.
2024-12-11 10:54:21 +00:00
Edward Thomson
1738f891a1 Merge pull request #6951 from ryan-ph/ryanpham/negative-refspec/parse
refs: Handle normalizing negative refspecs
2024-12-11 00:59:53 +00:00
Edward Thomson
7668c13552 refs: remove obsolete validity test with carat prefix
Refs can now be prefixed with a ^ (indicating a negative ref). Remove a
now-obsolete validity test.
2024-12-11 00:38:17 +00:00
Edward Thomson
27d82f15cd Merge pull request #6957 from libgit2/ethomson/docs-ci
Documentation: clean up old documentation
2024-12-10 23:59:36 +00:00
Edward Thomson
03e0bf3ba2 Documentation generation: verbose generation 2024-12-10 23:41:15 +00:00
Edward Thomson
0f1cb81a0c Documentation: clean up old documentation
Clean up the outdated documentation folder before re-generating it in
place. This accomodates a deleted API.
2024-12-10 23:22:35 +00:00
lmcglash
4fef2bd289 Move abbrev_length from object to repository. 2024-12-10 20:44:04 +00:00
Edward Thomson
6821bde736 Merge pull request #6940 from libgit2/ethomson/win32
Make `GIT_WIN32` an internal declaration
2024-12-10 07:57:49 +00:00
Edward Thomson
455ce40994 Make GIT_WIN32 an internal declaration
The `GIT_WIN32` macro should only be used internally; keep it as such.
2024-12-09 23:36:34 +00:00
Edward Thomson
f54d4601ce odb: fix mempack cast 2024-12-09 23:36:34 +00:00
Edward Thomson
4282cbd6d8 Merge remote-tracking branch 'main' into mempack_empty 2024-12-09 22:38:29 +00:00
Edward Thomson
4bb69b0827 odb_mempack: use an out param 2024-12-09 22:36:10 +00:00
Edward Thomson
2b74d4be1a Merge pull request #6955 from libgit2/ethomson/docs
Documentation: update refdb_backend docs
2024-12-09 22:17:45 +00:00
Edward Thomson
88fee7af56 Documentation: update refdb_backend docs
Parameters are documented by `@param`, not `@arg`
2024-12-09 21:52:44 +00:00
Edward Thomson
ce01bb30fc Merge pull request #6954 from libgit2/ethomson/docs
Documentation: don't resort versions
2024-12-09 17:28:56 +00:00
Edward Thomson
8ae0a22bf9 Documentation: don't resort versions
Array.sort() mutates the array _and_ returns it; don't mutate the
version array.
2024-12-09 17:02:37 +00:00
Edward Thomson
cd8f2730f1 Merge pull request #6953 from libgit2/ethomson/docs-search
Add search functionality to our docs generator
2024-12-09 13:13:15 +00:00
Edward Thomson
5efc00612c Generate search page in documentation generation 2024-12-09 12:39:21 +00:00
Edward Thomson
6297b6195c Add search capabilities to docs
Include "minisearch" which is a straightforward client-side search tool;
and a script to generate the search index for minisearch for each
version of libgit2.
2024-12-09 12:39:21 +00:00
Edward Thomson
1da67ef096 Allow documentation (re)generation in CI build
Provide a mechanism to allow the documentation to be force rebuilt.
2024-12-09 12:39:21 +00:00
Ryan Pham
2adb7bc3f5 refs: Handle normalizing negative refspecs
Negative refspecs were added in Git v2.29.0 which allows refspecs to be
prefixed with `^`[^1]. Currently, the library is unable to normalize
negative refspecs which causes errors in different tools that rely on
`libgit2`. Specifically, when the library attempts to parse and
normalize a negative refspec, it returns a `GIT_EINVALIDSPEC` code.

Add the ability to correctly normalize negative refspecs. While this PR
will not update the behavior of `fetch`, or other actions that rely on
negative refspecs, this allows us to be able to successfully parse and
normalize them. A future change will handle updating the individual
actions.

[^1]: c0192df630
2024-11-28 13:11:40 +09:00
Edward Thomson
c86842f0a5 Merge pull request #6938 from mathworks/lrm29-ssh-hostkey-check
ssh: Include rsa-sha2-256 and rsa-sha2-512 in the list of hostkey types
2024-11-26 22:32:07 +00:00
Edward Thomson
b8ad17faf5 Merge pull request #6949 from libgit2/ethomson/docs
Improve documentation and validate during CI
2024-11-26 22:14:51 +00:00
Edward Thomson
338ceb93b6 Improve documentation 2024-11-26 21:44:09 +00:00
Edward Thomson
5353a2cc20 reflog: remove unused sys functions
The `git_reflog_entry__alloc` function is not actually defined, nor
used. Remove references to it in the headers. It is not clear why the
corresponding `__free` is, or should be, exported. Make it internal to
the library.
2024-11-26 21:22:10 +00:00
Edward Thomson
8e516778ce Add CI step to validate documentation changes
Run our documentation generator in "validate only" mode to ensure that
new changes coming in to the repository have documented our changes
fully.
2024-11-26 21:22:10 +00:00
Edward Thomson
0bd5e479b2 Introduce a "validate only" mode for docs generation
The API documentation generation is useful (in `--strict` mode) to
determine whether all our APIs have sufficient documentation. Add a
`--validate-only` mode that will run the validation without emitting the
API JSON. This is useful for ensuring that the documentation is
complete.
2024-11-26 21:22:10 +00:00