summaryrefslogtreecommitdiff
path: root/tests/libgit2/repo
Commit message (Collapse)AuthorAgeFilesLines
* index: add sha256 supportEdward Thomson2023-04-101-1/+2
|
* repo: honor GIT_CONFIG_* environment variablesEdward Thomson2023-04-041-0/+52
| | | | | | When the repository is opened with `GIT_REPOSITORY_OPEN_FROM_ENV`, honor the `GIT_CONFIG_GLOBAL`, `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_NOSYSTEM` environment variables.
* repo: honor GIT_COMMON_DIR when respecting envEdward Thomson2023-04-041-0/+20
| | | | | When the repository is opened with `GIT_REPOSITORY_OPEN_FROM_ENV`, honor the `GIT_COMMON_DIR` environment variable.
* repo: honor GIT_WORK_TREE environment variableEdward Thomson2023-04-041-0/+20
| | | | | When the repository is opened with `GIT_REPOSITORY_OPEN_FROM_ENV`, honor the `GIT_WORK_TREE` environment variable.
* repo: free data in the discovery testsEdward Thomson2023-04-041-0/+3
| | | | Shocked that our leak checkers didn't find this earlier.
* #6491: Sets oid_type on repos open with git_repository_open_bareMiguel Arroz2023-02-171-0/+3
|
* tests: use static scope for test dataEdward Thomson2023-02-152-3/+3
|
* win32: adjust max path length for SHA256Edward Thomson2023-02-131-1/+1
| | | | | The longest path within a git repository is now a SHA256 format packfile. Adjust our max length checking to match.
* repo: don't overwrite repo format version on reinitEdward Thomson2023-02-121-7/+26
| | | | | Ensure that we maintain the `core.repositoryFormatVersion` value instead of always overwriting it with the default.
* repo: understand the `objectformat` extensionEdward Thomson2023-02-121-0/+69
| | | | | | Teach the repository about the `objectformat` extension, supporting `sha1` always and `sha256` when the experimental sha256 support is active.
* Add support for "safe.directory *"Sven Strickroth2022-11-191-0/+76
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* repo: test ownership validation fails with expected errorKevin Saul2022-10-011-8/+8
|
* sha256: indirection for experimental functionsEdward Thomson2022-07-134-25/+27
| | | | | The experimental function signature is only available when `GIT_EXPERIMENTAL_SHA256` is enabled.
* Merge pull request #6191 from libgit2/ethomson/sha256_pocEdward Thomson2022-07-135-26/+26
|\ | | | | RFC: SHA256 proof of concept
| * odb: add git_odb_optionsEdward Thomson2022-06-201-1/+1
| | | | | | | | | | Users will need to be able to specify the object id type for the given object database; add a new `git_odb_options` with that option.
| * odb_hash*: accept the oid type to hash intoEdward Thomson2022-06-201-20/+20
| | | | | | | | | | The git_odb_hash helper functions should not assume SHA1, and instead should be given the oid type that they're producing.
| * oid: give oids a typeEdward Thomson2022-06-202-4/+4
| | | | | | | | | | `git_oid`s now have a type, and we require the oid type when creating the object id from creation functions.
| * oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE`Edward Thomson2022-06-141-1/+1
| | | | | | | | | | In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
* | repo: allow admin owned configs by admin usersEdward Thomson2022-07-071-0/+14
| | | | | | | | | | Allow users in the administrator group to use git configs that are owned by administrators.
* | fs: remove mock naming from change ownership constantsEdward Thomson2022-07-071-10/+10
| | | | | | | | | | | | The file ownership concepts can reflect the actual file ownership, they are not necessarily limited to mocking the interface. Rename them so that they can be more broadly applicable.
* | repo: add tests for bare repo permissionsEdward Thomson2022-07-071-0/+67
| | | | | | | | Ensure that we test opening a bare repository with odd permissions.
* | Revert "repo: allow administrator to own the configuration"Edward Thomson2022-07-071-3/+2
|/ | | | | | | | This reverts commit cdff2f0237f663e0f68155655a8b66d05c1ec716. This change erroneously allowed system users to own a worktree; this should only be allowed when the current user is in the Administrator group on Windows as well.
* repo: allow administrator to own the configurationEdward Thomson2022-06-131-2/+3
| | | | | | | Update our ownership checks that were introduced in libgit2 v1.4.3 (to combat CVE 2022-24765). These were not compatible with git's; git itself allows administrators to own the path. Our checks now match this behavior.
* repo: make ownership checks optionalEdward Thomson2022-04-111-0/+10
| | | | | Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can disable repository ownership validation.
* repo: honor safe.directory during ownership checksEdward Thomson2022-04-111-0/+102
| | | | | | | Obey the `safe.directory` configuration variable if it is set in the global or system configuration. (Do not try to load this from the repository configuration - to avoid malicious repositories that then mark themselves as safe.)
* repo: test configuration ownership validationEdward Thomson2022-04-112-1/+35
| | | | | Test that we prevent opening directories that are not owned by ourselves.
* refactor: `tests` is now `tests/libgit2`Edward Thomson2022-02-2220-0/+3632
Like we want to separate libgit2 and utility source code, we want to separate libgit2 and utility tests. Start by moving all the tests into libgit2.