summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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.
* | | | | Merge branch 'pr/5853'Edward Thomson2021-05-191-0/+35
|\ \ \ \ \
| * | | | | diff: test ignore-blank-linesEdward Thomson2021-05-181-0/+35
| | |_|_|/ | |/| | |
* | | | | tests: clean up refs::races zero oid testEdward Thomson2021-05-181-1/+3
| | | | |
* | | | | tests: exit with error on win32 leakcheckEdward Thomson2021-05-181-0/+9
| | | | |
* | | | | Merge branch 'zero_oid_in_old'Edward Thomson2021-05-161-0/+16
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | Manually merging #5842
| * | | | refs: test git_reference_create_matching failure for zero oidEdward Thomson2021-05-161-0/+3
| | | | |
| * | | | git_reference_create_matching: Treat all-zero OID as "must be absent"David Turner2021-04-201-0/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Add testcaseKartikaya Gupta2021-05-1214-0/+66
| |_|/ |/| |
* | | Merge pull request #5860 from libgit2/ethomson/buf_textEdward Thomson2021-05-1112-62/+50
|\ \ \ | | | | | | | | buf: remove unnecessary buf_text namespace
| * | | buf: bom enum is in the buf namespaceEdward Thomson2021-05-111-3/+3
| | | | | | | | | | | | | | | | | | | | Instead of a `git_bom_t` that a `git_buf` function returns, let's keep it `git_buf_bom_t`.
| * | | buf: remove internal `git_buf_text` namespaceEdward Thomson2021-05-1112-59/+47
| | | | | | | | | | | | | | | | | | | | The `git_buf_text` namespace is unnecessary and strange. Remove it, just keep the functions prefixed with `git_buf`.
* | | | filter: deprecate git_filter_list_apply_to_dataEdward Thomson2021-05-063-73/+90
|/ / / | | | | | | | | | | | | 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.
* | | Merge pull request #5858 from libgit2/ethomson/memleaksEdward Thomson2021-05-062-0/+4
|\ \ \ | | | | | | | | test: clean up memory leaks
| * | | test: clean up memory leaksEdward Thomson2021-05-062-0/+4
| | | |
* | | | win32: add file and get status on a long pathEdward Thomson2021-05-061-1/+31
| | | |
* | | | win32: ensure core.longpaths is honored for workdir pathsEdward Thomson2021-05-061-0/+4
| | | |
* | | | path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAXIan Hattendorf2021-05-052-27/+5
| | | |
* | | | clar: support long paths on WindowsEdward Thomson2021-05-052-20/+61
|/ / /
* | | Merge pull request #5823 from libgit2/ethomson/path_validationEdward Thomson2021-05-029-206/+391
|\ \ \ | |/ / |/| | Working directory path validation
| * | repo: validate repository pathsEdward Thomson2021-04-281-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | refs: ensure loose refs adhere to path validationEdward Thomson2021-04-281-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | attr: validate workdir paths for attribute filesEdward Thomson2021-04-281-3/+3
| | | | | | | | | | | | | | | | | | 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.
| * | repo: introduce git_repository_workdir_pathEdward Thomson2021-04-281-0/+16
| | | | | | | | | | | | | | | | | | | | | 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.