tests


Log

Author Commit Date CI Message
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
Peter Pettersson d17e67e6 2021-08-29T12:19:49 tests: change comments to c89 style
Edward Thomson 34e685c0 2021-08-27T08:28:01 Merge pull request #5747 from lhchavez/atomic-tests Homogenize semantics for atomic-related functions
lhchavez e66545e3 2021-08-27T04:06:54 Merge remote-tracking branch 'origin/main' into multi-pack-index-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.
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.
Alexander Ovchinnikov 6bb35878 2021-02-08T00:49:21 clone: set refs/remotes/origin/HEAD to default branch when branch is specified, attempt 2
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 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.
Edward Thomson dc1ba018 2021-03-20T13:01:00 path: introduce ondisk and workdir path validation Introduce `git_path_validate_filesystem` which validates (absolute) on-disk paths and `git_path_validate_workdir` to perform validations on (absolute) working directory paths. These functions are useful as there may be system limitations on on-disk paths, particularly on Windows (for example, enforcing MAX_PATH). For working directory paths, these limitations may be per-repository, based on the `core.longpaths` configuration setting.
David Turner 95b7a639 2021-04-14T21:52:36 git_reference_create_matching: Treat all-zero OID as "must be absent" This is pretty useful in avoiding races: I want to create a ref only if it doesn't already exist. I can't check first because of TOCTOU -- by the time I finish the check, someone else might have already created the ref. And I can't take a lock because then I can't do the create, since the create expects to take the lock. The semantics are inspired by git update-ref, which allows an all-zero old value to mean that the ref must not exist.
Edward Thomson 88323cd0 2021-03-20T09:52:17 path: git_path_isvalid -> git_path_validate If we want to validate more and different types of paths, the name `git_path_validate` makes that easier and more expressive. We can add, for example, `git_path_validate_foo` while the current name makes that less ergonomic.
Edward Thomson cb136cdd 2021-04-14T22:22:11 utf8: introduce git_utf8_char_length Introduce a function to determine the number of Unicode characters in a given UTF-8 string.
Tobias Nießen 52447c5c 2021-04-11T23:16:37 tests: fix variable name in list.c
Ian Hattendorf 7891e153 2021-04-01T11:34:38 Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string We already do this in repo_init_head
lhchavez 25b75cd9 2021-03-10T07:06:15 commit-graph: Create `git_commit_graph` as an abstraction for the file This change does a medium-size refactor of the git_commit_graph_file and the interaction with the ODB. Now instead of the ODB owning a direct reference to the git_commit_graph_file, there will be an intermediate git_commit_graph. The main advantage of that is that now end users can explicitly set a git_commit_graph that is eagerly checked for errors, while still being able to lazily use the commit-graph in a regular ODB, if the file is present.
Edward Thomson a0fca809 2021-03-10T11:19:14 Merge pull request #5814 from ianhattendorf/fix/winhttp-proxy-https winhttp: skip certificate check if unable to send request
Edward Thomson d7e65096 2021-03-04T09:44:26 Merge pull request #5764 from lhchavez/cgraph-needs-refresh commit-graph: Introduce `git_commit_graph_needs_refresh()`
Edward Thomson b99b5a81 2021-03-04T09:38:10 Merge pull request #5763 from lhchavez/cgraph-lookup commit-graph: Support lookups of entries in a commit-graph
Ian Hattendorf 592a3252 2021-03-01T11:00:37 winhttp: test proxy https clone
Edward Thomson 2ad15250 2021-02-01T09:58:25 Merge pull request #5762 from lhchavez/cgraph-parser commit-graph: Introduce a parser for commit-graph files
Edward Thomson 4732e030 2021-01-31T00:36:54 revspec: rename git_revparse_mode_t to git_revspec_t The information about the type of a revision spec is not information about the parser. Name it accordingly, so that `git_revparse_mode_t` is now `git_revspec_t`. Deprecate the old name.
Edward Thomson 674875dc 2021-01-15T09:59:15 Merge pull request #5768 from lhchavez/midx-needs-refresh midx: Fix a bug in `git_midx_needs_refresh()`
Edward Thomson 487f2a82 2021-01-10T21:32:28 Merge pull request #5775 from libgit2/ethomson/clone_branch clone: set refs/remotes/origin/HEAD when branch is specified
lhchavez 1a2f9609 2021-01-05T06:24:26 commit-graph: Introduce `git_commit_graph_needs_refresh()` This change introduces a function that allows the caller to know whether the `commit-graph` file has not been modified since it was parsed. Part of: #5757
lhchavez 1f32ed25 2021-01-04T19:33:48 commit-graph: Support lookups of entries in a commit-graph This change introduces `git_commit_graph_entry_find()` and `git_commit_graph_entry_parent()`. These two functions allow a much faster lookup of commits by ID, since the ODB does not need to be consulted, the commit object does not need to be inflated, and the contents of the commit object do not need to be parsed. Part of: #5757
lhchavez 3fd57a75 2021-01-04T18:22:43 commit-graph: Introduce a parser for commit-graph files This change is the first in a series to add support for git's commit-graph. This should speed up commit graph traversals by avoiding object parsing and allowing some operations to terminate earlier. Part of: #5757
Edward Thomson 923c0f7b 2021-01-07T17:34:17 clone: set refs/remotes/origin/HEAD when branch is specified When a branch is specified to check out in clone, update the remote tracking `HEAD` to point to it. This mimics git's behavior, when `git clone -b <name>` is used.
lhchavez d50d3db6 2021-01-07T05:43:30 midx: Fix a bug in `git_midx_needs_refresh()` The very last check in the freshness check for the midx was wrong >< This was also because this function was not tested.
Edward Thomson 3f4bc213 2021-01-07T14:05:02 repo: ignore empty init.defaultbranch The init.defaultbranch option may be set, but empty. In this case, we should ignore it instead of trying to set our default branch to `refs/heads/`.
Edward Thomson c41871e5 2021-01-07T12:22:08 fetch: test when HEAD points to nonexistent branch When HEAD points to a nonexistent or invalid branch - for example, to `refs/heads/` - the fetch should be permitted to continue, but we should not use it when creating the `for merge` option in the FETCH_HEAD file. (This emulates git's behavior.)
Edward Thomson c31032a3 2021-01-07T10:15:25 Merge pull request #5760 from libgit2/ethomson/tttoo_many_ttts blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`
Edward Thomson 855f2998 2021-01-05T14:45:14 blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD` `GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD` is misspelled, it should be `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`, and it would be if it were not for the MacBook Pro keyboard and my inattentiveness.
Edward Thomson d9c15387 2021-01-05T14:29:58 blob: add git_blob_filter_options_init The `git_blob_filter_options_init` function should be included, to allow callers in FFI environments to let us initialize an options structure for them.
Edward Thomson 780ad7a9 2020-12-17T14:09:45 urlparse: use consistent ipv6 address rules IPv6 addresses should be used identically internally; we should not denote them with brackets in one operating system and without them in another.
Paul Wolfgang (DC-AE/ESF1) ab3e8565 2019-07-01T19:59:01 urlparse: Add IPv4 and IPv6 based tests