Commit Graph

14906 Commits

Author SHA1 Message Date
Edward Thomson
183ca01885 fixup! ci: run the no-keep-alive tests 2023-03-30 12:53:17 +01:00
Edward Thomson
5b61b773ab httpclient: return GIT_RETRY to indicate keep-alive retry
The server may break a keep-alive connection after a successful request,
in which case we should try to re-send it. Indicate this state in the
httpclient with `GIT_RETRY` and re-connect and re-send the request.
2023-03-30 12:29:15 +01:00
Edward Thomson
b837aa79b4 ci: run the no-keep-alive tests 2023-03-30 12:29:13 +01:00
Edward Thomson
c362cc91c7 http: ensure that we can handle broken keep-alives
Test against our testing HTTP server that we can support the case when
the server (legally) breaks the connection after the first successful
request/response on a keep-alive connection.
2023-03-30 12:29:09 +01:00
Edward Thomson
2f20fe8869 Merge pull request #6505 from libgit2/ethomson/extension_madness
repo: don't allow repeated extensions
2023-03-27 11:58:42 +01:00
Edward Thomson
9bfad74dc0 Merge pull request #6533 from libgit2/ethomson/schannel-2
Introduce Schannel and SSPI for Windows
2023-03-27 11:58:14 +01:00
Edward Thomson
c058aa87dc Merge pull request #6534 from libgit2/ethomson/v1.6.3
v1.6.3
v1.6.3
2023-03-21 03:52:21 -07:00
Edward Thomson
a1826a8b1b v1.6.3: update changelog 2023-03-21 10:15:25 +00:00
Edward Thomson
2173ca8a41 v1.6.3: update version numbers 2023-03-21 10:13:23 +00:00
Edward Thomson
f15c8ac71a http: add SSPI authentication on Windows
Add support for SSPI on Windows, which offers NTLM and Negotiate
authentication.
2023-03-21 09:15:14 +00:00
Edward Thomson
0d7f3f5291 utf8: add conversion with size and refactor names
Add functions to use convert a string with length, instead of assuming
NUL termination.

In addition, move the utf8 to 16 conversion routines into the `git_utf8`
namespace instead of using namespaceless `git__` prefixed names.
2023-03-21 09:14:06 +00:00
Edward Thomson
cff0d9b1cc http: refactor GSSAPI / negotiate / NTLM auth
Name the GSSAPI and ntlmclient authentication providers as such. Today
they're named after the authentication mechanism ("Negotiate", "NTLM")
instead of their implementation.

If we have competing implementations for the same mechanism (eg, a
future Windows SSPI-based provider for Negotiate and NTLM) then this
will get confusing.
2023-03-21 09:14:06 +00:00
Edward Thomson
f68f542eb6 http: introduce schannel streams for windows
Provide a stream interface for Schannel - the native crypto APIs - on
Windows. This allows Windows to use the same HTTP transport that all the
other platforms use, with its own native crypto.

Ultimately this allows us to deprecate WinHTTP and we need not add
support for our socket changes in two places (our HTTP stack and the
WinHTTP stack).
2023-03-21 09:09:48 +00:00
Edward Thomson
1b929b3d85 Merge pull request #6530 from libgit2/cmn/pack-index-64
pack: use 64 bits for the number of objects
2023-03-16 02:48:59 -07:00
Carlos Martín Nieto
1d57344cdf pack: cast to uint64_t when calculating index size instead
It is a bit too hidden why we want 64 bits when we're assigning to a 32-bit
integer later on to store the number of objects, so go back to uint32_t and cast
to uint64_t during the size calculation.
2023-03-16 09:21:37 +01:00
Carlos Martín Nieto
62b9f80357 pack: use 64 bits for the number of objects
Keeping it as a 32-bit value means the min size calculation overflows or gets
truncated which can lead to issues with large packfiles.
2023-03-14 15:57:49 +01:00
Edward Thomson
8f8e805e3f Merge pull request #6529 from libgit2/ethomson/include_sanity
cmake: don't include `include/git2`
2023-03-11 05:57:19 -08:00
Edward Thomson
cbc5c6adfa cmake: don't include include/git2
Including the `include/git2` build path is a seemingly unnecessary
oversight to include the generated `experimental.h` file.
2023-03-10 22:45:24 +00:00
Edward Thomson
d066d0d95c Merge pull request #6527 from Batchyx/batchyx/wchar-fixes 2023-03-08 09:11:03 -08:00
Nicolas Cavallari
20811c5aa9 sysdir: Do not declare win32 functions on non-win32 platforms
These declaration poses problems on some embedded or retro Linux systems
that deliberately disable support for wchar_t from their libc.
2023-03-08 14:00:52 +01:00
Edward Thomson
8164b48162 Merge pull request #6521 from libgit2/ethomson/weird_ignore 2023-03-03 04:38:10 -08:00
Edward Thomson
129cadf9bf index: support git_index_add_all directories with force
When the contents of an entire new directory is ignored, and `FORCE` is
specified to `git_index_add_all`, ensure that we expand the entire file
list. By default, diff will coalesce a fully ignored folder into a
single diff entry; expand it.
2023-03-02 23:22:01 +00:00
Edward Thomson
309befe413 index: test git_index_add_all with force
Ensure that when all files beneath a directory are ignored that we
add the files when FORCE is specified.
2023-03-02 23:21:50 +00:00
Edward Thomson
6fb5ab3723 index: test git_index_add_all with ignored folder
Ensure that when all files beneath a directory are ignored that we
actually ignore the files.
2023-03-02 23:09:36 +00:00
Edward Thomson
af12fc11c5 Merge pull request #6520 from libgit2/ethomson/git_odb_open
odb: restore `git_odb_open`
2023-03-02 01:31:57 -08:00
Edward Thomson
7445d510be Merge pull request #6513 from libgit2/ethomson/util_test_root
fs_path: let root run the ownership tests
2023-03-01 16:19:56 -08:00
Edward Thomson
c59d519c49 Merge pull request #6518 from georgthegreat/patch-1
Remove unused wditer variable
2023-03-01 16:19:11 -08:00
Edward Thomson
e1e0d77c6f odb: restore git_odb_open
`git_odb_open` was erroneously removed during a refactoring; add it
back.
2023-03-01 22:16:31 +00:00
Yuriy Chernyshov
3770bf6766 Remove unused wditer variable
Found this randomly while debugging #6517
2023-02-28 19:03:51 +03:00
Edward Thomson
25ec37379e v1.6.2: update changelog v1.6.2 2023-02-28 10:22:07 +00:00
Edward Thomson
9d1a3ef7c7 v1.6.2: update version numbers 2023-02-28 10:18:00 +00:00
Edward Thomson
da82fb5471 Merge pull request #6514 from libgit2/ethomson/libgit2_pc 2023-02-27 15:16:55 -08:00
Edward Thomson
a7561e0eda Merge pull request #6512 from libgit2/ethomson/odb_loose 2023-02-27 14:23:35 -08:00
Edward Thomson
c0dc97be95 Merge pull request #6511 from libgit2/ethomson/hostandport
Revert #6503
2023-02-27 14:11:44 -08:00
Edward Thomson
3142fdba32 meta: configure pkg-config .pc correctly
The library name is correctly libgit2 (not git2) or libgit2-experimental
depending on configuration.
2023-02-27 22:08:47 +00:00
Edward Thomson
59bb933c17 odb: test git_odb_backend_loose 2023-02-27 21:54:59 +00:00
Edward Thomson
c4523c6c66 odb: add back git_odb_backend_loose
`git_odb_backend_loose` was erroneously removed during a refactoring;
add it back.
2023-02-27 21:54:59 +00:00
Edward Thomson
5c1d764910 fs_path: let root run the ownership tests
The `git_fs_path_owner_is_current_user` expects the root dir on unix
(`/`) to be owned by a non-current user. This makes sense unless root
(or euid == 0) is running the tests, which often happens during distro
build / packaging scripts. Allow them to run the tests.
2023-02-27 21:52:33 +00:00
Edward Thomson
c28ebdf256 Revert "tests: validate host and port for ssh tests when non-standard"
This reverts commit 43e84e246c.
2023-02-27 20:38:02 +00:00
Edward Thomson
5adde38315 Revert "Pass hostkey & port to host verify callback"
This reverts commit f68b40c0af.
2023-02-27 20:37:50 +00:00
Edward Thomson
44d3372e40 Merge pull request #6506 from libgit2/ethomson/zero_update_tips
remote: always populate old id in update tips
2023-02-27 12:32:09 -08:00
Edward Thomson
cd40b91863 remote: always populate old id in update tips
In b1e83cca1b we erroneously stopped
setting the old ID to zero; correct that.
2023-02-25 23:22:32 +00:00
Edward Thomson
e25f9a9bb8 repo: don't allow repeated extensions
If a user attempts to add a custom extension that the system already
supports, or that is already in their list of custom extensions, de-dup
it.
2023-02-25 22:25:12 +00:00
Edward Thomson
8a871d13b7 v1.6.1: correct missing version number updates v1.6.1 2023-02-25 13:53:43 +00:00
Edward Thomson
f507938dbb Merge pull request #6501 from libgit2/ethomson/v1.6
v1.6
2023-02-25 05:47:13 -08:00
Edward Thomson
ef235a1662 v1.6: update version numbers 2023-02-24 22:21:41 +00:00
Edward Thomson
c5b306020d v1.6: update the changelog 2023-02-24 22:21:41 +00:00
Edward Thomson
f7325c4480 Merge pull request #6503 from fxcoudert/hostandport
Pass hostkey & port to host verify callback
2023-02-24 13:41:57 -08:00
Edward Thomson
43e84e246c tests: validate host and port for ssh tests when non-standard 2023-02-24 21:11:58 +00:00
Francois-Xavier Coudert
f68b40c0af Pass hostkey & port to host verify callback
Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
2023-02-24 21:11:58 +00:00