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
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
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
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
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
Edward Thomson
a7561e0eda
Merge pull request #6512 from libgit2/ethomson/odb_loose
2023-02-27 14:23:35 -08:00
Edward Thomson
59bb933c17
odb: test git_odb_backend_loose
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
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
43e84e246c
tests: validate host and port for ssh tests when non-standard
2023-02-24 21:11:58 +00:00
Edward Thomson
80016e0e96
tests: always unset HTTP_PROXY before starting tests
...
The remote::httpproxy::env test (correctly) reset the environment before
running; however the other tests are also impacted by the environment
and need to have it isolated.
2023-02-23 10:19:19 +00:00
Miguel Arroz
c1b024fb4d
#6491 : Sets oid_type on repos open with git_repository_open_bare
2023-02-17 11:06:48 -08:00
Edward Thomson
05ba3fe4e1
Merge pull request #6330 from gitkraken-jacobw/partial-stashing
...
stash: partial stash specific files
2023-02-16 10:23:28 +00:00
Edward Thomson
b8fff35ab3
tests: use static scope for test data
2023-02-15 10:08:42 +00:00
Edward Thomson
80742e159c
Merge pull request #6456 from libgit2/ethomson/sha256_experimental
...
SHA256: more SHA256 support
2023-02-14 17:01:23 +00:00
Edward Thomson
f7963f28ca
Merge pull request #6455 from libgit2/ethomson/sysdir
...
Support the notion of a home directory separately from global configuration directory
2023-02-14 16:36:19 +00:00
Edward Thomson
0362ecd6f1
Merge pull request #6423 from cavaquinho/fix/6422-revwalk_push_glob-dangling-ref
...
#6422 : handle dangling symbolic refs gracefully
2023-02-14 15:23:11 +00:00
Edward Thomson
3b43c9d335
Merge branch 'revparse'
2023-02-14 12:01:04 +00:00
Sven Strickroth
0628e25d04
Fix parsing rev with reflog of HEAD (e.g., HEAD@{3})
...
Fixes issue #6156 .
Signed-off-by: Sven Strickroth <email@cs-ware.de >
2023-02-14 11:52:28 +00:00
Iliyas Jorio
b755b7d294
diff_file: don't mmap/readbuffer empty files
...
This prevents GIT_MMAP_VALIDATE from failing.
This also prevents git_diff_file_content__unload from attempting to free git_str__initstr.
2023-02-13 21:31:47 +01:00
Edward Thomson
e7a7691146
win32: adjust max path length for SHA256
...
The longest path within a git repository is now a SHA256 format
packfile. Adjust our max length checking to match.
2023-02-13 10:27:13 +00:00
Edward Thomson
0006ff6335
clone: support sha256
2023-02-12 22:02:00 +00:00
Edward Thomson
fe2ee3a018
object: lookup sha256 objects
...
This is much of the plumbing for the object database to support SHA256,
and for objects to be able to parse SHA256 versions of themselves.
2023-02-12 22:02:00 +00:00
Edward Thomson
6204499242
odb: test sha256 pack backend
2023-02-12 21:26:12 +00:00
Edward Thomson
479c8c8c14
packfile: handle sha256 packfiles
...
Teach the packfile machinery to cope with SHA256.
2023-02-12 21:26:12 +00:00
Edward Thomson
e89e2e0102
odb: rename test file to avoid underscore
...
In clar, an underscore is meaningful; avoid using it incorrectly /
unnecessarily.
2023-02-12 21:26:11 +00:00
Edward Thomson
23df884ea7
tests: add a sha256 repository
...
This is a conversion of the testrepo.git to SHA256 support.
2023-02-12 21:26:11 +00:00
Edward Thomson
f6dbf9c594
tests: helpers for getting ints from configuration
2023-02-12 21:26:11 +00:00
Edward Thomson
366973f378
repo: don't overwrite repo format version on reinit
...
Ensure that we maintain the `core.repositoryFormatVersion` value instead
of always overwriting it with the default.
2023-02-12 21:26:11 +00:00
Edward Thomson
acb00e4eae
repo: understand the objectformat extension
...
Teach the repository about the `objectformat` extension, supporting
`sha1` always and `sha256` when the experimental sha256 support is
active.
2023-02-12 21:26:10 +00:00
Edward Thomson
4083e46f47
oid: provide type lookups by enum value or name
2023-02-09 12:31:16 +00:00
Edward Thomson
9b546b2ba1
ci: run clone tests in online
2023-02-09 12:10:40 +00:00
Edward Thomson
247474fdbd
tests: known_hosts manipulating ssh clone tests
...
Teach the clone tests how to clone from github.com, when given a keypair
with a passphrase and known_hosts data. This allows us to better
exercise our known_hosts checking and ensure that the lifecycle of the
certificate callback matches our expectations.
2023-02-09 12:10:40 +00:00
Edward Thomson
ff67b5e117
tests: use a dummy homedir
...
Use a dummy home directory for tests to avoid user data leaking into
test execution.
2023-02-09 12:10:40 +00:00
Edward Thomson
f32ec999b0
tests: configure temporary homedirs correctly
...
Now that we've split the notion of the home directory from the global
configuration store, our tests should use the appropriate one based on
what they're doing.
2023-02-09 12:10:40 +00:00
Edward Thomson
9a9863645d
sysdir: move windows sysdir functions out of shared util
...
The windows sysdir functions are libgit2-specific and for git
compatibility only; remove them from the shared util directory and bring
them into the libgit2 source tree.
2023-02-09 12:10:40 +00:00
Edward Thomson
ed26a908fe
clar: cross-platform elapsed time counter
...
Abstract time counter for tests; use gettimeofday on Unix and
GetTickCount on Windows.
2023-01-25 09:37:22 +00:00
Edward Thomson
4e15c9c87f
tests: fix clar declarations
2023-01-25 09:36:48 +00:00
Edward Thomson
6bf0459a42
tests: update clar test runner
...
Update to the latest main version of clar, which includes improved xml
summary output.
2023-01-25 09:36:07 +00:00
Edward Thomson
2347eb3263
Merge pull request #6362 from sven-of-cord/main
...
push: revparse refspec source, so you can push things that are not refs
2023-01-20 22:33:36 +00:00
Edward Thomson
3ee86a3329
Merge commit 'e33d7c068' into ssh_key_checking
2023-01-20 22:13:14 +00:00
tagesuhu
b57b7628d4
tests: Add new test to submodule::update
...
Verify that trying to update submodule which has been configured but not added does return an error.
Issue #6433 : git_submodule_update fails to update configured but missing submodule
2022-11-25 16:32:39 +00:00
Edward Thomson
12832bab73
Merge pull request #6326 from libgit2/ethomson/url_parse
...
URL parsing for google-compatible URLs
2022-11-23 13:57:07 +00:00
Sven Strickroth
594bd70b84
Add support for "safe.directory *"
...
Signed-off-by: Sven Strickroth <email@cs-ware.de >
2022-11-19 12:00:43 +01:00
Edward Thomson
ad2d3a0696
Merge pull request #6408 from kcsaul/fix-safe-directory-not-found
...
Ignore missing 'safe.directory' config during ownership checks
2022-11-18 13:54:49 +00:00