summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* rebase: deprecate signing_cbethomson/commit_create_cbEdward Thomson2021-08-291-11/+26
| | | | | The signing callback should not be used; instead, callers should provide a commit_create_cb, perform the signing and commit creation themselves.
* rebase: introduce git_commit_create_cbEdward Thomson2021-08-291-0/+231
| | | | | | | 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.
* tests: change comments to c89 stylePeter Pettersson2021-08-292-9/+9
|
* Merge pull request #5747 from lhchavez/atomic-testsEdward Thomson2021-08-271-0/+125
|\ | | | | Homogenize semantics for atomic-related functions
| * Homogenize semantics for atomic-related functionslhchavez2021-08-261-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | clone: set refs/remotes/origin/HEAD to default branch when branch is ↵Alexander Ovchinnikov2021-08-261-0/+8
| | | | | | | | specified, attempt 2
* | Revert "Merge pull request #5775 from libgit2/ethomson/clone_branch"Alexander Ovchinnikov2021-08-261-8/+0
|/ | | | | This reverts commit 487f2a8287c4d1d41d39e05ac53d0e50c679d7e9, reversing changes made to c6cf7f0e6927f1b264a7dda2467d70b9f744a01f.
* Merge pull request #6006 from boretrk/c11-warningsEdward Thomson2021-08-251-5/+5
|\ | | | | GCC C11 warnings
| * win32: name the dummy union in GIT_REPARSE_DATA_BUFFERPeter Pettersson2021-08-251-5/+5
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #5802 from lhchavez/git-warn-unused-resultEdward Thomson2021-08-256-18/+13
|\ \ | | | | | | Introduce GIT_WARN_UNUSED_RESULT
| * | Proof-of-concept for a more aggressive GIT_UNUSED()lhchavez2021-08-084-11/+6
| | | | | | | | | | | | | | | | | | 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!
| * | Introduce GIT_WARN_UNUSED_RESULTlhchavez2021-08-082-7/+7
| | | | | | | | | | | | | | | This change adds the GIT_WARN_UNUSED_RESULT annotation, which makes the compiler warn when a return result is not used. This avoids bugs.
* | | Merge pull request #5950 from boretrk/posixtestEdward Thomson2021-08-255-15/+16
|\ \ \ | |_|/ |/| | open: input validation for empty segments in path
| * | tests: don't generate false positives on empty path segmentsPeter Pettersson2021-08-085-15/+16
| |/
* | tests: show errors when libgit2_init failsEdward Thomson2021-08-241-1/+3
| |
* | Merge pull request #5854 from alexjg/respect-force-flag-in-remote-fetchEdward Thomson2021-08-101-0/+169
|\ \ | |/ |/| Respect the force flag on refspecs in git_remote_fetch
| * skip descendant check if remote ref not foundAlex Good2021-08-051-19/+4
| |
| * Fix memory sanitizer failures in testsAlex Good2021-06-301-15/+18
| |
| * Respect the force flag on refspecs in git_remote_fetchAlex Good2021-06-111-0/+181
| |
* | tests: reset odb backend priorityethomson/odb_tests_priorityEdward Thomson2021-07-301-0/+6
| |
* | Merge branch 'pr/5491'Edward Thomson2021-07-301-0/+23
|\ \
| * | odb: Implement option for overriding of default odb backend priorityTony De La Nuez2021-07-301-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix one memory leak in masterlhchavez2021-07-301-0/+2
|/ / | | | | | | There was one test that wasn't correctly disposing of the repository.
* | Merge branch 'pr/5861'Edward Thomson2021-07-301-0/+23
|\ \
| * | tests: reformat upstream mergeEdward Thomson2021-07-301-5/+5
| | |
| * | tests: upstream merge test has been added.Dmitry Lobanov2021-06-181-0/+23
| | |
* | | Merge pull request #5952 from libgit2/ethomson/attrs_from_commitEdward Thomson2021-07-2911-10/+76
|\ \ \ | | | | | | | | Support reading attributes from a specific commit
| * | | filter: introduce GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMITEdward Thomson2021-07-228-0/+65
| | | | | | | | | | | | | | | | | | | | Provide a mechanism to filter using attribute data from a specific commit (making use of `GIT_ATTR_CHECK_INCLUDE_COMMIT`).
| * | | attr: introduce `git_attr_options` for extended queriesEdward Thomson2021-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | attr: the attr source is now a structEdward Thomson2021-07-221-1/+2
| | | | | | | | | | | | | | | | | | | | We may want to extend the attribute source; use a structure instead of an enum.
| * | | attr: rename internal attr file source enumEdward Thomson2021-07-222-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Swap the order of the `git_graph_reachable_from_any` paramslhchavez2021-07-271-6/+6
| | | | | | | | | | | | | | | | len, array -> array, len
* | | | graph: Create `git_graph_reachable_from_any()`lhchavez2021-07-271-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #5765 from lhchavez/cgraph-revwalksEdward Thomson2021-07-261-15/+15
|\ \ \ \ | | | | | | | | | | commit-graph: Use the commit-graph in revwalks
| * | | | commit-graph: Create `git_commit_graph` as an abstraction for the filelhchavez2021-03-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #5890 from lolgear/git_submodule_dupEdward Thomson2021-07-221-0/+40
|\ \ \ \ \ | |_|/ / / |/| | | | [Submodule] Git submodule dup
| * | | | tests: submodule git lookup can be dupped test comments have been changed.Dmitry Lobanov2021-06-151-3/+3
| | | | |
| * | | | tests: submodule git lookup can be dupped test has been added.Dmitry Lobanov2021-06-031-0/+40
| | | | |
* | | | | Merge pull request #5941 from NattyNarwhal/stdintificationEdward Thomson2021-07-165-242/+242
|\ \ \ \ \ | | | | | | | | | | | | stdintification: use int64_t and INT64_C instead of long long
| * | | | | Update tests/graph/commit_graph.cEdward Thomson2021-07-161-1/+1
| | | | | |
| * | | | | stdint constants in test suiteCalvin Buckley2021-07-075-242/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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' ```
* | | | | | Merge pull request #5913 from lhchavez/python3Edward Thomson2021-07-141-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Make `FIND_PACKAGE(PythonInterp)` prefer `python3`
| * | | | | | Make `FIND_PACKAGE(PythonInterp)` prefer `python3`lhchavez2021-07-141-0/+1
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`).
* | | | | | Merge pull request #5824 from palmin/fix-ignore-negateEdward Thomson2021-07-141-0/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | fix check for ignoring of negate rules
| * | | | | | test that specific lines can negate broader ignore linesAnders Borum2021-06-141-0/+8
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #5926 from Batchyx/batchyx/config-refresh-twiceEdward Thomson2021-07-141-0/+24
|\ \ \ \ \ \ | | | | | | | | | | | | | | config: fix included configs not refreshed more than once
| * | | | | | config: fix included configs not refreshed more than onceNicolas Cavallari2021-06-231-0/+24
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge pull request #5908 from punkymaniac/patch-mem-leakEdward Thomson2021-07-131-0/+40
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix memory leak in git_smart__connect
| * | | | | Add test for fetch proxy memleakpunkymaniac2021-06-161-0/+40
| |/ / / /
* | | | | Consider files executable only if the user can execute themDavid Turner2021-06-161-0/+39
|/ / / / | | | | | | | | | | | | This is what git.git does, so we should follow suit.