16323 Commits

Author SHA1 Message Date
Edward Thomson
4546929e00 cmake: case insensitive options
It's hard to remember whether it's `-DUSE_HTTPS=mbedTLS` or
`-DUSE_HTTPS=mbedtls`. Even worse for things like `builtin` which we may
have been inconsistent about. Allow for case insensitive options.
2025-01-02 12:36:46 +00:00
Edward Thomson
5a654f11bb cmake: update git2_features.h
Reorganize the libgit2 feature selection file.
2025-01-02 12:36:45 +00:00
Edward Thomson
c4c284e46f cmake: standardize HTTPS backend definitions
There were a few oddities around HTTPS provider selection: namely,
`GIT_OPENSSL_DYNAMIC` implied `GIT_OPENSSL`, which made a bit of sense,
until we added FIPS support. In addition, dynamic OpenSSL for _hashes_
and dynamic OpenSSL for HTTPS was conflated in a few places.

Untangle these, and make `GIT_HTTPS_*` the define, for consistency with
other feature provider selection.
2025-01-02 12:36:11 +00:00
Edward Thomson
c42ccfaa34 cmake: don't report futimes enablement
futimes is not an option; don't report enablement as such.
2025-01-02 12:36:11 +00:00
Edward Thomson
9efdbe3834 cmake: standardize leak check option
The `GIT_WIN32_LEAKCHECK` option is a debugging option, so it should be
`GIT_DEBUG_LEAKCHECK_WIN32`
2025-01-02 12:36:11 +00:00
Edward Thomson
94d8883dcf cmake: update verbiage on feature enablement 2025-01-02 12:36:11 +00:00
Edward Thomson
bab249d82e cmake: standardize xdiff options 2025-01-02 12:36:11 +00:00
Edward Thomson
2b581ef517 cmake: update threads
For consistency with other backend/provider selection, allow
`USE_THREADS` to select the threads provider.
2025-01-02 12:36:11 +00:00
Edward Thomson
890d70856c cmake: update nanosecond selection
For consistency, specify the nanosecond option in the same way as other
options, and identify it as such. Split the detection of platform
support (`FindStatNsec`) and its selection (`SelectNsec`).
2025-01-02 12:36:11 +00:00
Edward Thomson
8bbd2f406e cmake: use DEBUG_LEAK_CHECKER as option
The `USE_` prefix for inputs denotes a backend; the `DEBUG_` prefix
denotes a debugging option. Make `DEBUG_LEAK_CHECKER` the name of the
leak checking option.
2025-01-02 12:36:11 +00:00
Edward Thomson
c9974d28b2 cmake: update Negotiate backend selection 2025-01-02 12:36:11 +00:00
Edward Thomson
fb59acb246 cmake: update NTLM feature enablement 2025-01-02 12:36:09 +00:00
Edward Thomson
9ea1f6d4ed cmake: standardize iconv options 2025-01-02 11:45:47 +00:00
Edward Thomson
78a8c44cc1 cmake: standardize regex options
Selecting regular expression backend should be specified in the same way
as everything else; `USE_REGEX`. Keep `REGEX_BACKEND` as an optional
fallback.
2025-01-02 11:45:47 +00:00
Edward Thomson
fdb73f5d1d cmake: simplify compression selection 2025-01-02 11:45:47 +00:00
Edward Thomson
c4a65c34c2 cmake: standardize builtin sha1dc selection
All `USE_*` options are now `builtin`. Use that for the builtin sha1dc
implementation, keeping `CollisionDetection` for backward compatibility.
2025-01-02 11:45:47 +00:00
Edward Thomson
9961198879 Merge pull request #6982 from libgit2/ethomson/no_dotgit_for_separate_workdir
No `.git` for separate workdir
2024-12-30 21:17:43 +00:00
Edward Thomson
ca2a241e4c repo: workdir_path implies no dotgit in init
When specifying a separate working directory path, the given repository
path should never have a `.git` directory created beneath it. That
simply doesn't make sense.

As a result, the `GIT_REPOSITORY_INIT_NO_DOTGIT_DIR` now _also_ no
longer makes sense. It would only ever be a sensible option when one
wanted a separate `.git` directory and working directory, otherwise the
git files and working directory files would be comingled. Remove the
option entirely.
2024-12-30 20:36:13 +00:00
Edward Thomson
e9d97bedc2 Merge pull request #6966 from libgit2/ethomson/tls
ssl: enforce TLS v1.2 (or better)
2024-12-28 23:44:12 +00:00
Edward Thomson
338e6fb681 Merge pull request #6990 from libgit2/ethomson/ci v1.9.0 2024-12-28 12:01:25 +00:00
Edward Thomson
76fe3978ae Merge pull request #6989 from libgit2/ethomson/readme 2024-12-28 11:49:15 +00:00
Edward Thomson
e447de936d ci: only build docs on main branch pushes
Don't build docs on pushes to maint branches; those docs should only be
built _on release_. In addition, be safer about not creating an existing
branch from a tracking branch.
2024-12-28 10:59:12 +00:00
Edward Thomson
d7f3fb568e README: add v1.9 builds 2024-12-28 10:27:39 +00:00
Edward Thomson
25d87c2d89 Merge pull request #6987 from libgit2/ethomson/changelog
v1.9: final changelog updates
2024-12-28 10:24:16 +00:00
Edward Thomson
1329f1a1db v1.9: final changelog updates 2024-12-28 10:02:09 +00:00
Edward Thomson
a8fbbf77b8 Merge pull request #6986 from libgit2/ethomson/warn_sha1
cmake: warn for not using sha1dc
2024-12-28 09:58:25 +00:00
Edward Thomson
550cf62021 cmake: warn for not using sha1dc
git's hash algorithm is sha1dc, it is not sha1. Per Linus:

> Honestly, git has effectively already moved from SHA1 to SHA1DC.
>
> So the actual known attack and weakness of SHA1 should simply not be
> part of the discussion for the next hash. You can basically say "we're
> _already_ on the second hash, we just picked one that was so
> compatible with SHA1 that nobody even really noticed.

Warn users who try to compile with SHA1 instead of SHA1DC.
2024-12-28 09:52:42 +00:00
Edward Thomson
d85c1a1b79 Merge pull request #6985 from libgit2/ethomson/soname_revert
meta: revert soname version update
2024-12-28 09:52:21 +00:00
Edward Thomson
3aeb5bd0f6 meta: revert soname version update
Changing our SONAME / ABI version update policy without an announcement
is a breaking change. Provide time to announce a policy update.
2024-12-28 08:30:39 +00:00
Edward Thomson
dc816591d5 Merge pull request #6979 from libgit2/ethomson/v19 2024-12-28 01:57:34 +00:00
Edward Thomson
c536fcbb85 v1.9: update version numbers
Update the library's (API) version number to v1.9.0. Also update the
soname version number to 2.0, since we've had breaking ABI changes
to the library.
2024-12-28 01:00:19 +00:00
Edward Thomson
e96e250446 v1.9: update changelog 2024-12-28 01:00:19 +00:00
Edward Thomson
800a95371c Merge pull request #6984 from libgit2/ethomson/cli
CLI: introduce `init` command
2024-12-28 00:32:57 +00:00
Edward Thomson
838875eb8f Merge branch 'cmake_target' 2024-12-28 00:30:28 +00:00
Edward Thomson
ded9494954 cmake: only add package target for libgit2 itself 2024-12-28 00:26:11 +00:00
Edward Thomson
9f61001ad5 cli: improve option help 2024-12-28 00:02:25 +00:00
Edward Thomson
5350142b9b Merge pull request #6981 from libgit2/ethomson/gitlink_newline 2024-12-27 17:17:35 +00:00
Edward Thomson
5723964ca2 Merge pull request #6983 from libgit2/ethomson/template_path 2024-12-27 17:05:17 +00:00
Edward Thomson
bf5f0b5600 cli: add an init command 2024-12-27 16:50:26 +00:00
Edward Thomson
a844a6cf23 repo: put a newline on the .git link file
The `.git` file, when containing a `gitdir: ` link, should be suffixed
with a trailing newline.
2024-12-27 16:38:26 +00:00
Edward Thomson
0c27a85b41 repo: don't require option when template_path is specified
When a `template_path` is explicitly specified, don't _also_ require an
option to indicate that we should use templates. We, obviously, should.
2024-12-27 16:20:11 +00:00
Edward Thomson
ccc202802c Merge pull request #6962 from ryan-ph/ryanpham/negative-refspec/remote
remote: Handle fetching negative refspecs
2024-12-24 23:55:06 +00:00
Ryan Pham
099e62ca03 remote: Don't use designated initializer 2024-12-24 10:42:57 +09:00
Ryan Pham
6039d28d43 remote: Return first matching refspec
The previous behavior was to return the first match, so this reverts the
clobbering behavior that was introduced in
f7f30ec136.
2024-12-24 10:42:02 +09:00
Ryan Pham
83994dafec remote: Remove unnecessary call
`git_refspec_is_negative()` is already called by
`git_refspec_src_matches_negative()`, so should not be necessary here.
2024-12-24 10:41:56 +09:00
bmarques1995
5d6e679e21 Rebase 2024-12-23 20:27:40 -03:00
Bruno S Marques
3951f96d1a Merge branch 'libgit2:main' into main 2024-12-23 20:31:13 -03:00
Edward Thomson
536f868be6 Merge pull request #6973 from kempniu/ignore-shallow-packets-during-ack-processing
smart: ignore shallow/unshallow packets during ACK processing
2024-12-23 20:15:50 +00:00
Edward Thomson
416a8d4b46 Merge pull request #6978 from libgit2/ethomson/docs
docs: properly parse enum values
2024-12-23 20:14:24 +00:00
Edward Thomson
53c14952ba docs: properly parse enum values
For enum values that are constructed, not literal integers, we need to
parse the inner / implicit expression. For example:

```
GIT_DIFF_REVERSE = (1u << 0)
```
2024-12-23 17:22:43 +00:00