summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Added missing is_prunable testReginald McLean2023-05-161-0/+13
|
* clone: skip timeout tests on WinHTTPethomson/timeoutsEdward Thomson2023-05-131-0/+16
|
* streams: sockets are non-blocking and can timeoutEdward Thomson2023-05-132-1/+61
| | | | | | | | | | | | | | | Make socket I/O non-blocking and add optional timeouts. Users may now set `GIT_OPT_SET_SERVER_CONNECT_TIMEOUT` to set a shorter connection timeout. (The connect timeout cannot be longer than the operating system default.) Users may also now configure the socket read and write timeouts with `GIT_OPT_SET_SERVER_TIMEOUT`. By default, connects still timeout based on the operating system defaults (typically 75 seconds) and socket read and writes block. Add a test against our custom testing git server that ensures that we can timeout reads against a slow server.
* net: move `gitno` buffer to `staticstr`Edward Thomson2023-05-132-2/+0
| | | | | | | | The `gitno` buffer interface is another layer on top of socket reads. Abstract it a bit into a "static string" that has `git_str` like semantics but without heap allocation which moves the actual reading logic into the socket / stream code, and allows for easier future usage of a static / stack-allocated `git_str`-like interface.
* net: move rfc2818 hostname / wildcard matching to utilEdward Thomson2023-05-132-13/+13
|
* util: make monotonic time fn return msEdward Thomson2023-05-133-10/+10
| | | | | | | | | | | | | | | | | `git__timer` is now `git_time_monotonic`, and returns milliseconds since an arbitrary epoch. Using a floating point to store the number of seconds elapsed was clever, as it better supports the wide range of precision from the different monotonic clocks of different systems. But we're a version control system, not a real-time clock. Milliseconds is a good enough precision for our work _and_ it's the units that system calls like `poll` take and that our users interact with. Make `git_time_monotonic` return the monotonically increasing number of milliseconds "ticked" since some arbitrary epoch.
* Merge pull request #6557 from libgit2/ethomson/shallowEdward Thomson2023-05-0935-2/+692
|\ | | | | Shallow (#6396) with some fixes from review
| * fetch: remove `unshallow` optionEdward Thomson2023-05-091-1/+1
| | | | | | | | | | The `depth` field is suitable to specify unshallowing; provide an enum to aide in specifying the `unshallow` value.
| * oid: use an oid array instead of shallowarrayEdward Thomson2023-05-093-68/+117
| | | | | | | | | | | | Users should provide us an array of object ids; we don't need a separate type. And especially, we should not be mutating user-providing values. Instead, use `git_oid *` in the shallow code.
| * shallow: cleanup whitespace in testsEdward Thomson2023-05-081-16/+16
| |
| * grafts: handle SHA256 graft filesEdward Thomson2023-05-082-2/+2
| |
| * transport: transports understand oid typeEdward Thomson2023-04-251-2/+2
| | | | | | | | Teach the smart transport more about oid types, instead of assuming SHA1.
| * shallow: move tests to onlineEdward Thomson2023-04-241-12/+4
| |
| * shallow: remove feature flagEdward Thomson2023-04-243-16/+0
| | | | | | | | | | The opt mechanism isn't _really_ meant to be for feature flags, and it's weird to feature flag shallow / unshallow at all.
| * Merge remote-tracking branch 'origin/main' into shallow-clone-networkEdward Thomson2023-04-22117-139/+1572
| |\
| * \ Merge commit 'd066d0d95c43e97df6624292f3f527f9372ca8fe'lmcglash2023-03-10212-709/+4981
| |\ \
| * | | refactor grafts testsYuang Li2022-09-063-9/+9
| | | |
| * | | remove unused statementsYuang Li2022-09-051-1/+0
| | | |
| * | | fix seg faultsYuang Li2022-09-052-1/+3
| | | |
| * | | fix free errorYuang Li2022-08-311-2/+0
| | | |
| * | | fix shallowarray testYuang Li2022-08-311-3/+3
| | | |
| * | | support fetch unshallow option on shallow reposyuangli2022-08-092-0/+93
| | | |
| * | | edit tests for shallow clonesyuangli2022-08-021-10/+38
| | | |
| * | | fix clone::shallow test behaviouryuangli2022-07-291-1/+1
| | | |
| * | | eliminate build warningsyuangli2022-07-291-9/+9
| | | |
| * | | Merge branch 'transportPR' into shallow-clone-networkyuangli2022-07-291-0/+105
| |\ \ \
| | * | | add test for shallow repo depth 1yuangli2022-07-191-11/+49
| | | | |
| | * | | enable cloning of shallow repoyuangli2022-07-191-9/+16
| | | | |
| | * | | rewrite shallow_rootyuangli2022-07-071-3/+7
| | | | |
| | * | | attempt to buildyuangli2022-07-053-245/+2
| | | | |
| | * | | Merge branch 'pr/tiennou/4747' into transportPRyuangli2022-07-043-0/+299
| | | | |
| * | | | Merge branch 'mw_dev' into shallow-clone-localYuang Li2022-07-29169-1125/+1760
| |\ \ \ \
| * | | | | eliminate build warningsyuangli2022-07-273-0/+0
| | | | | |
| * | | | | Merge branch 'pr/pks-t/5254' into shallow-clone-localyuangli2022-07-2632-0/+440
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | disable shallow clone feature flag in test cleanupYuang Li2022-06-282-0/+2
| | | | | |
| | * | | | enable shallow clone support in tests when necessaryYuang Li2022-06-282-0/+2
| | | | | |
| | * | | | move feature flag tests to tests/grafts/shallow.cYuang Li2022-06-272-11/+10
| | | | | |
| | * | | | add test for shallow feature flagYuang Li2022-06-271-0/+11
| | | | | |
| | * | | | Merge branch 'main' into pr/pks-t/5254Yuang Li2022-06-24148-1018/+5179
| | |\ \ \ \
| | * | | | | repository: do not expose grafting mechanismPatrick Steinhardt2020-06-271-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we expose the function `git_repository_shallow_roots` to get all grafted roots of the repository. This already paints us into a corner, though, as we certainly need to experiment with some functionality of the grafting mechanism before we can happily expose some of its functionality. Most importantly, we need to get right when to refresh grafts and when not. Thus, this commit removes the public function with no public replacement. We should first try and see what usecases people come up with to e.g. expose the `git_grafts` mechanism directly in the future or do something different altogether. Instead, we provide an internal interface to get weak pointers to the grafting structs part of the repository itself.
| | * | | | | repository: reuse grafts for shallow rootsPatrick Steinhardt2020-06-271-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shallow roots are in fact another user of the grafting mechanism, and in essence they do use the same file format for grafted commits. Thus, instead of hand-coding the parsing logic a second time, we can just reuse the `git_grafts` structure for shallow commits, as well.
| | * | | | | grafts: move parsing into grafts modulePatrick Steinhardt2020-06-271-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of grafts files is currently contained in the repository code. To make grafts-related logic more self-contained, move it into "grafts.c" instead.
| | * | | | | grafts: make the structure self-contained and opaquePatrick Steinhardt2020-06-271-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to increase maintainability in the future, we should try to make structures as self-contained and opaque to its users as possible. Thus it is probably not a good idea to just typedef `git_graftmap` to `git_oidmap`, as that will make it a lot harder in the future to extend the API in the future, if this need ever arises. Refactor the code to instead declare a real structure `git_grafts`, which is completely opaque to its callers.
| | * | | | | tests: graft commitsEtienne Samson2020-06-2732-39/+274
| | | | | | |
* | | | | | | sha256: wrap_odb supports SHA256Edward Thomson2023-05-063-3/+4
| | | | | | |
* | | | | | | odb: test object lookups from git_repository_wrap_odbEdward Thomson2023-05-061-1/+20
| |_|_|_|_|/ |/| | | | |
* | | | | | Merge pull request #6549 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-04-22109-124/+1423
|\ \ \ \ \ \ | | | | | | | | | | | | | | sha256: less hardcoded SHA1 types and lengths
| * | | | | | commit graph: support sha256Edward Thomson2023-04-101-2/+15
| | | | | | |
| * | | | | | midx: support sha256Edward Thomson2023-04-101-1/+6
| | | | | | |
| * | | | | | diff: parse patches with sha256Edward Thomson2023-04-1012-73/+97
| | | | | | |