tests


Log

Author Commit Date CI Message
Basile Henry 5eab4daf 2021-09-09T21:51:52 Add test config parsing This tests parsing a multiline string containing multiple quoted comment chars. See #6019
Edward Thomson 3c0f14cc 2021-09-01T20:34:28 remote: refactor proxy detection Update the proxy detection for a remote. 1. Honor `http.<url>.proxy` syntax for a remote's direct URL and parent URLs. 2. Honor an empty configuration URL to override a proxy configuration. Add tests to ensure that configuration specificity is honored.
Edward Thomson 9e98e443 2021-08-31T22:01:34 url: introduce `git_net_url_matches_pattern_list` Provide a utility method on a url to determine if it matches any pattern in a comma-separated list, similar to what one would find in `NO_PROXY` environment variables.
Edward Thomson e5ba0a3c 2021-08-31T20:41:45 url: introduce `git_net_url_matches_pattern` Provide a method to determine if a given URL matches a host:port pattern like the ones found in `NO_PROXY` environment variables.
Edward Thomson 3680f0bf 2021-08-31T09:41:14 tests: create the network::url test hierarcy
Edward Thomson 1196de4f 2021-08-31T15:22:44 util: introduce `git__strlcmp` Introduce a utility function that compares a NUL terminated string to a possibly not-NUL terminated string with length. This is similar to `strncmp` but with an added check to ensure that the lengths match (not just the `size` portion of the two strings).
Mathieu Parent e5a32774 2021-02-11T22:53:16 Add NO_PROXY env support Item 2 of 3 from #4164 Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Edward Thomson 98be5a11 2021-08-30T17:55:47 Merge branch 'cgraph-write' into main
Edward Thomson b16a36e1 2021-08-29T22:53:49 Merge pull request #6011 from libgit2/ethomson/filter_apply filter: filter drivers stop taking git_buf as user input
Edward Thomson 258115db 2021-08-29T22:53:38 Merge pull request #6016 from libgit2/ethomson/commit_create_cb Introduce `create_commit_cb`, deprecate `signing_cb`
Edward Thomson 16a2e667 2021-08-29T22:53:28 Merge pull request #6012 from libgit2/ethomson/custom_url remote: introduce remote_ready_cb, deprecate resolve_url callback
Edward Thomson 9f84003c 2021-08-29T22:34:19 Merge pull request #6009 from libgit2/ethomson/custom_cert_locations opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS
Edward Thomson 0e047268 2021-08-25T18:01:34 opts: test GIT_OPT_SET_SSL_CERT_LOCATIONS Include a self-signed certificate for test.libgit2.org:1443 that we can use to verify that GIT_OPT_SET_SSL_CERT_LOCATIONS works.
lhchavez 7d9ebdc8 2021-08-29T18:50:49 Merge remote-tracking branch 'origin/main' into cgraph-write
Edward Thomson 2998a84a 2021-08-29T21:49:33 Merge pull request #5841 from J0Nes90/features/checkout-dry-run Checkout dry-run
Edward Thomson c3512fe6 2021-08-29T21:35:40 Merge branch 'main' into multi-pack-index-odb-write
Edward Thomson 78cd7624 2021-08-29T21:30:51 Merge pull request #5404 from lhchavez/multi-pack-index-write midx: Add a way to write multi-pack-index files
Edward Thomson 7442c000 2021-08-27T11:25:51 remote: deprecate resolve_url callback Using a callback to set a resolve_url is not particularly idiomatic. Deprecate it in favor of the `set_instance_url` and `set_instance_pushurl` functions which can now be called from the `git_remote_ready_cb` callback.
Edward Thomson 72df17c6 2021-08-27T10:59:51 remote: introduce git_remote_ready_cb Introduce a new callback that fires when the remote is ready to connect.
Edward Thomson ef03e150 2021-08-29T10:14:01 rebase: deprecate signing_cb The signing callback should not be used; instead, callers should provide a commit_create_cb, perform the signing and commit creation themselves.
Edward Thomson d3bdf33b 2021-08-29T09:36:01 rebase: introduce git_commit_create_cb Introduce a new mechanism for `git_rebase_commit` for callers to customize the experience. Instead of assuming that we produce the commit for them, provide a commit creation callback that allows callers to produce the commit themselves and return the resulting commit id.
Peter Pettersson d17e67e6 2021-08-29T12:19:49 tests: change comments to c89 style
Edward Thomson c089d5ac 2021-08-27T16:51:38 filter: use streaming filters in tests
Edward Thomson 67240677 2021-05-14T00:33:08 remote: introduce set_instance_url Users may want to override the URL on a particular instance of a remote, instead of updating the configuration. Previously, users could use a callback to do this, but this is not particularly idiomatic.
Edward Thomson 34e685c0 2021-08-27T08:28:01 Merge pull request #5747 from lhchavez/atomic-tests Homogenize semantics for atomic-related functions
lhchavez ea285904 2020-02-18T00:02:13 midx: Introduce git_odb_write_multi_pack_index() This change introduces git_odb_write_multi_pack_index(), which creates a `multi-pack-index` file from all the `.pack` files that have been loaded in the ODB. Fixes: #5399
lhchavez 9d117e38 2020-02-17T21:28:13 midx: Add a way to write multi-pack-index files This change adds the git_midx_writer_* functions to allow to write and create `multi-pack-index` files from `.idx`/`.pack` files. Part of: #5399
lhchavez e66545e3 2021-08-27T04:06:54 Merge remote-tracking branch 'origin/main' into multi-pack-index-write
lhchavez 47c70fc5 2021-08-26T05:40:20 Merge remote-tracking branch 'origin/main' into cgraph-write
lhchavez 74708a81 2020-12-20T12:45:01 Homogenize semantics for atomic-related functions There were some subtle semantic differences between the various implementations of atomic functions. Now they behave the same, have tests and are better documented to avoid this from happening again in the future. Of note: * The semantics chosen for `git_atomic_compare_and_swap` match `InterlockedCompareExchangePointer`/`__sync_cal_compare_and_swap` now. * The semantics chosen for `git_atomic_add` match `InterlockedAdd`/`__atomic_add_fetch`. * `git_atomic_swap` and `git_atomic_load` still have a bit of semantic difference with the gcc builtins / msvc interlocked operations, since they require an l-value (not a pointer). If desired, this can be homogenized.
lhchavez 63f08e42 2021-08-26T05:29:34 Make the defaultable fields defaultable Also, add `git_commit_graph_writer_options_init`!
Alexander Ovchinnikov 6bb35878 2021-02-08T00:49:21 clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2
Alexander Ovchinnikov 8643b524 2021-02-08T00:40:50 Revert "Merge pull request #5775 from libgit2/ethomson/clone_branch" This reverts commit 487f2a8287c4d1d41d39e05ac53d0e50c679d7e9, reversing changes made to c6cf7f0e6927f1b264a7dda2467d70b9f744a01f.
Edward Thomson c7a195a1 2021-08-25T14:11:03 Merge pull request #6006 from boretrk/c11-warnings GCC C11 warnings
Peter Pettersson 4bbe5e6e 2021-08-25T18:14:10 win32: name the dummy union in GIT_REPARSE_DATA_BUFFER Instead of buf->"typeofbuffer"ReparseBuffer the members will be referenced with buf->ReparseBuffer."typeofbuffer" https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/ns-ntifs-_reparse_data_buffer?redirectedfrom=MSDN calls the union DUMMYUNIONNAME but that looks a bit cluttered.
Edward Thomson efc4e7e5 2021-08-25T12:30:06 Merge pull request #5802 from lhchavez/git-warn-unused-result Introduce GIT_WARN_UNUSED_RESULT
Edward Thomson 0850b172 2021-08-25T12:20:50 Merge pull request #5950 from boretrk/posixtest open: input validation for empty segments in path
Edward Thomson e265eb2f 2021-08-24T13:58:24 tests: show errors when libgit2_init fails
Edward Thomson 5fd44239 2021-08-10T10:06:43 Merge pull request #5854 from alexjg/respect-force-flag-in-remote-fetch Respect the force flag on refspecs in git_remote_fetch
lhchavez 231ca4fa 2021-02-23T19:33:34 Proof-of-concept for a more aggressive GIT_UNUSED() This adds a `-Wunused-result`-proof `GIT_UNUSED()`, just to demonstrate that it works. With this, sortedcache.h is now completely `GIT_WARN_UNUSED_RESULT`-annotated!
lhchavez 9eb17d46 2021-02-16T19:38:34 Introduce GIT_WARN_UNUSED_RESULT This change adds the GIT_WARN_UNUSED_RESULT annotation, which makes the compiler warn when a return result is not used. This avoids bugs.
Peter Pettersson d095502e 2021-08-08T13:34:06 tests: don't generate false positives on empty path segments
Alex Good a5696702 2021-07-08T11:58:28 skip descendant check if remote ref not found
Edward Thomson e5975f36 2021-07-30T11:37:12 tests: reset odb backend priority
Edward Thomson e87bcb3d 2021-07-30T10:32:02 Merge branch 'pr/5491'
Tony De La Nuez cd460522 2020-04-20T22:16:52 odb: Implement option for overriding of default odb backend priority Introduce GIT_OPT_SET_ODB_LOOSE_PRIORITY and GIT_OPT_SET_ODB_PACKED_PRIORITY to allow overriding the default priority values for the default ODB backends. Libgit2 has historically assumed that most objects for long- running operations will be packed, therefore GIT_LOOSE_PRIORITY is set to 1 by default, and GIT_PACKED_PRIORITY to 2. When a client allows libgit2 to set the default backends, they can specify an override for the two priority values in order to change the order in which each ODB backend is accessed.
lhchavez d15b6132 2021-07-30T07:18:57 Fix one memory leak in master There was one test that wasn't correctly disposing of the repository.
Edward Thomson cc68c19a 2021-07-30T08:56:51 Merge branch 'pr/5861'
Edward Thomson f2915ec4 2021-07-30T08:56:34 tests: reformat upstream merge
Edward Thomson 003a1df6 2021-07-29T08:48:17 Merge pull request #5952 from libgit2/ethomson/attrs_from_commit Support reading attributes from a specific commit
lhchavez 83862c83 2020-02-17T21:28:13 commit-graph: Add a way to write commit-graph files This change adds the git_commit_graph_writer_* functions to allow to write and create `commit-graph` files from `.idx`/`.pack` files or `git_revwalk`s. Part of: #5757
lhchavez 8d453f16 2021-07-27T13:00:31 Swap the order of the `git_graph_reachable_from_any` params len, array -> array, len
lhchavez ce5400cd 2021-01-06T06:26:09 graph: Create `git_graph_reachable_from_any()` This change introduces a new API function `git_graph_reachable_from_any()`, that answers the question whether a commit is reachable from any of the provided commits through following parent edges. This function can take advantage of optimizations provided by the existence of a `commit-graph` file, since it makes it faster to know whether, given two commits X and Y, X cannot possibly be an reachable from Y. Part of: #5757
lhchavez fff209c4 2020-02-17T21:28:13 midx: Add a way to write multi-pack-index files This change adds the git_midx_writer_* functions to allow to write and create `multi-pack-index` files from `.idx`/`.pack` files. Part of: #5399
Edward Thomson 2370e491 2021-07-26T16:27:54 Merge pull request #5765 from lhchavez/cgraph-revwalks commit-graph: Use the commit-graph in revwalks
Edward Thomson 43b5075d 2021-07-22T17:07:56 Merge pull request #5890 from lolgear/git_submodule_dup [Submodule] Git submodule dup
Edward Thomson 1439b9ff 2021-07-22T15:29:54 filter: introduce GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT Provide a mechanism to filter using attribute data from a specific commit (making use of `GIT_ATTR_CHECK_INCLUDE_COMMIT`).
Edward Thomson 3779a047 2021-05-27T18:47:22 attr: introduce `git_attr_options` for extended queries Allow more advanced attribute queries using a `git_attr_options`, and extended functions to use it. Presently there is no additional configuration in a `git_attr_options` beyond the flags, but this is for future growth.
Edward Thomson 96dc1ffd 2021-05-22T20:14:47 attr: the attr source is now a struct We may want to extend the attribute source; use a structure instead of an enum.
Edward Thomson 5ee50488 2021-05-22T18:47:03 attr: rename internal attr file source enum The enum `git_attr_file_source` is better suffixed with a `_t` since it's a type-of source. Similarly, its members should have a matching name.
Edward Thomson 6a7f0403 2021-07-16T08:47:37 Merge pull request #5941 from NattyNarwhal/stdintification stdintification: use int64_t and INT64_C instead of long long
Edward Thomson d6bea53d 2021-07-16T08:47:28 Update tests/graph/commit_graph.c
Edward Thomson f15a6792 2021-07-14T09:33:09 Merge pull request #5913 from lhchavez/python3 Make `FIND_PACKAGE(PythonInterp)` prefer `python3`
Edward Thomson 84ce9746 2021-07-14T08:39:24 Merge pull request #5824 from palmin/fix-ignore-negate fix check for ignoring of negate rules
Edward Thomson 97cd165e 2021-07-14T08:30:00 Merge pull request #5926 from Batchyx/batchyx/config-refresh-twice config: fix included configs not refreshed more than once
lhchavez b7dce05c 2021-06-16T06:38:41 Make `FIND_PACKAGE(PythonInterp)` prefer `python3` This change makes it possible to prefer a python (version 3) interpreter on systems where python2 and python3 coexist (where python2 is found as `/usr/bin/python`).
Edward Thomson 95a2966f 2021-07-13T17:32:02 Merge pull request #5908 from punkymaniac/patch-mem-leak Fix memory leak in git_smart__connect
Calvin Buckley 3f28eafe 2021-07-07T19:35:42 stdint constants in test suite Passes w/ gcc 11 on Fedora x64. Protip: So you don;t have to suffer, ``` perl -pe 's/(-?(?:0x)?[A-Fa-f0-9]+)([Uu])?[Ll][Ll]/\U$2INT64_C(\E$1)/mg' ```
Alex Good 8ad5998f 2021-06-30T12:59:37 Fix memory sanitizer failures in tests
Nicolas Cavallari 4bf136b0 2021-06-23T16:53:53 config: fix included configs not refreshed more than once If an included config is refreshed twice, the second update is not taken into account. This is because the list of included files is cleared after re-reading the new configuration, instead of being cleared before. Fix it and add a test case to check for this bug.
Dmitry Lobanov 55f2abb8 2021-06-18T15:47:15 tests: upstream merge test has been added.
David Turner b0fd4cf8 2021-06-16T13:38:45 Consider files executable only if the user can execute them This is what git.git does, so we should follow suit.
punkymaniac bea1b024 2021-06-16T10:32:46 Add test for fetch proxy memleak
Dmitry Lobanov 54a52452 2021-06-15T17:33:29 tests: submodule git lookup can be dupped test comments have been changed.
Anders Borum b34aaf6c 2021-06-14T14:39:20 test that specific lines can negate broader ignore lines
Alex Good 1713ab45 2021-05-02T13:41:59 Respect the force flag on refspecs in git_remote_fetch
Dmitry Lobanov 11452ca1 2021-06-03T11:14:58 tests: submodule git lookup can be dupped test has been added.
Edward Thomson 1ee3c37f 2021-05-19T09:31:30 Merge branch 'pr/5853'
Edward Thomson 6b1f6e00 2021-05-18T12:21:15 diff: test ignore-blank-lines
Edward Thomson 1b1e541d 2021-05-18T11:52:51 tests: clean up refs::races zero oid test
Edward Thomson a6fb72a8 2021-05-18T11:51:25 tests: exit with error on win32 leakcheck
Edward Thomson 58944388 2021-05-16T11:11:56 Merge branch 'zero_oid_in_old' Manually merging #5842
Edward Thomson cf323cb9 2021-05-16T11:09:44 refs: test git_reference_create_matching failure for zero oid
Kartikaya Gupta 2d24690c 2021-04-15T07:48:43 Add testcase
Edward Thomson ff78aea6 2021-05-11T11:09:31 Merge pull request #5860 from libgit2/ethomson/buf_text buf: remove unnecessary buf_text namespace
Edward Thomson 14f6950b 2021-05-10T23:14:17 buf: bom enum is in the buf namespace Instead of a `git_bom_t` that a `git_buf` function returns, let's keep it `git_buf_bom_t`.
Edward Thomson d525e063 2021-05-10T23:04:59 buf: remove internal `git_buf_text` namespace The `git_buf_text` namespace is unnecessary and strange. Remove it, just keep the functions prefixed with `git_buf`.
Edward Thomson 68b9605a 2021-05-06T15:37:31 filter: deprecate git_filter_list_apply_to_data Deprecate `git_filter_list_apply_to_data` as it takes user input as a `git_buf`. Users should use `git_filter_list_apply_to_buffer` instead.
Edward Thomson 4bd17208 2021-05-06T02:28:14 Merge pull request #5858 from libgit2/ethomson/memleaks test: clean up memory leaks
Edward Thomson b31795ef 2021-05-06T01:46:19 test: clean up memory leaks
Edward Thomson 33667c14 2021-05-05T23:59:05 win32: add file and get status on a long path
Edward Thomson f8921ab9 2021-05-05T23:26:24 win32: ensure core.longpaths is honored for workdir paths
Ian Hattendorf 69c65b9a 2019-12-31T12:38:03 path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAX
Edward Thomson 5368be30 2021-05-05T23:01:57 clar: support long paths on Windows
Edward Thomson c44f5688 2021-05-02T10:27:56 Merge pull request #5823 from libgit2/ethomson/path_validation Working directory path validation
Edward Thomson c15ed350 2021-04-26T12:23:25 repo: validate repository paths Ensure that a repository's path (at initialization or open time) is valid. On Windows systems, this means that the longest known path beneath the repository will fit within MAX_PATH: this is a lock file for a loose object within the repository itself. Other paths, like a very long loose reference, may fail to be opened after the repository is opened. These variable length paths will be checked when they are accessed themselves. This new functionality is done at open to prevent needlessly checking every file in the gitdir (eg, `MERGE_HEAD`) for its length when we could instead check once at repository open time.
Edward Thomson e5851c62 2021-04-24T09:44:45 refs: ensure loose refs adhere to path validation On Windows, we need to enforce MAX_PATH for loose references and their reflogs. Ensure that any path - including the lock file - would fit within the 260 character maximum. We do not honor core.longpaths for loose reference files or reflogs. core.longpaths only applies to paths in the working directory.
Edward Thomson 9fb755d5 2021-04-04T19:59:57 attr: validate workdir paths for attribute files We should allow attribute files - inside working directories - to have names longer than MAX_PATH when core.longpaths is set. `git_attr_path__init` takes a repository to validate the path with.
Edward Thomson 50e01216 2021-03-20T16:39:29 repo: introduce git_repository_workdir_path Add a simple accessor for workdir paths to get an absolute on-disk path given a repository and a relative path within it. This is useful to avoid copy-pasta `git_buf_joinpath` and to ensure that we validate working directory paths while honoring `core.longpaths` settings.
Edward Thomson dbc03de4 2021-03-20T14:28:25 apply: ensure we validate paths There was no test ensuring that we validate `.git` paths. We do, but let's add a test to make sure that we never regress this.