summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | commit: apply grafts when parsingEtienne Samson2020-06-271-5/+23
| | | | | | |
| | * | | | | repo: graft shallow roots on openEtienne Samson2020-06-271-0/+24
| | | | | | |
| | * | | | | repo: load shallow rootsEtienne Samson2020-06-272-0/+81
| | | | | | |
| | * | | | | repo: load grafts on openEtienne Samson2020-06-274-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wires git_repository to open the .git/info/grafts file and load its contents as git_commit_grafts objects.
| | * | | | | repo: basic graft APIEtienne Samson2020-06-272-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This represents (old-style) grafted commits, a.k.a an array of overridden parents for a commit's OID.
* | | | | | | util: detect all possible qsort_r and qsort_s variantsDimitry Andric2023-05-083-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in https://bugs.freebsd.org/271234, recent versions of FreeBSD have adjusted the prototype for qsort_r() to match the POSIX interface. This causes libgit2's CMake configuration check to fail to detect qsort_r(), making it fall back to qsort_s(), which in libgit2 also has an incompatible interface. With recent versions of clang this results in a "incompatible function pointer types" compile error. Summarizing, there are four variations of 'qsort-with-context': * old style BSD qsort_r(), used in FreeBSD 13 and earlier, where the comparison function has the context parameter first * GNU or POSIX qsort_r(), also used in FreeBSD 14 and later, where the comparison function has the context parameter last * C11 qsort_s(), where the comparison function has the context parameter last * Microsoft qsort_s(), where the comparison function has the context parameter first Add explicit detections for all these variants, so they get detected as (in the same order as above): * `GIT_QSORT_R_BSD` * `GIT_QSORT_R_GNU` * `GIT_QSORT_S_C11` * `GIT_QSORT_S_MSC` An additional complication is that on FreeBSD 14 and later, <stdlib.h> uses the C11 _Generic() macro mechanism to automatically select the correct qsort_r() prototype, depending on the caller's comparison function argument. This breaks CMake's check_prototype_definition() functionality, since it tries to redefine the function, and _Generic macro is expanded inline causing a compile error. Work around that problem by putting the function names in parentheses, to prevent the preprocessor from using a macro to replace the function name. Also, in `git__qsort_r()`, change the `#if` order so the variants that do not have to use glue are preferred.
* | | | | | | sha256: wrap_odb supports SHA256Edward Thomson2023-05-062-3/+26
| | | | | | |
* | | | | | | Fix missing oid type for "fake" repositoriesOliver Reiche2023-05-031-0/+2
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | ... otherwise git_tree__parse_raw() will fail to obtain the correct oid size, which causes the entire parse to fail.
* | | | | | Merge pull request #6549 from libgit2/ethomson/sha256_experimentalEdward Thomson2023-04-2258-527/+1087
|\ \ \ \ \ \ | | | | | | | | | | | | | | sha256: less hardcoded SHA1 types and lengths
| * | | | | | commit graph: support sha256Edward Thomson2023-04-103-48/+132
| | | | | | |
| * | | | | | midx: support sha256Edward Thomson2023-04-103-34/+85
| | | | | | |
| * | | | | | blame: support sha256Edward Thomson2023-04-101-16/+23
| | | | | | |
| * | | | | | ident: support sha256Edward Thomson2023-04-101-3/+3
| | | | | | |
| * | | | | | iterator: support sha256Edward Thomson2023-04-103-6/+27
| | | | | | |
| * | | | | | email: support sha256Edward Thomson2023-04-101-3/+4
| | | | | | |
| * | | | | | commit_list: support sha256Edward Thomson2023-04-101-2/+4
| | | | | | |
| * | | | | | describe: support sha256Edward Thomson2023-04-101-7/+10
| | | | | | |
| * | | | | | cherrypick: support sha256Edward Thomson2023-04-101-3/+3
| | | | | | |
| * | | | | | merge: support sha256Edward Thomson2023-04-103-6/+8
| | | | | | |
| * | | | | | repo: use `GIT_OID_DEFAULT` for default oid typeEdward Thomson2023-04-101-3/+3
| | | | | | |
| * | | | | | diff: parse patches with sha256Edward Thomson2023-04-1010-63/+161
| | | | | | |
| * | | | | | apply: support SHA256Edward Thomson2023-04-101-1/+1
| | | | | | |
| * | | | | | reset: support SHA256Edward Thomson2023-04-101-2/+2
| | | | | | |
| * | | | | | notes: support SHA256Edward Thomson2023-04-101-8/+9
| | | | | | |
| * | | | | | rebase: support SHA256 oidsEdward Thomson2023-04-101-84/+72
| | | | | | |
| * | | | | | revert: support SHA256 oidsEdward Thomson2023-04-101-11/+8
| | | | | | |
| * | | | | | branch: support sha256 OIDs for branch refsEdward Thomson2023-04-101-2/+2
| | | | | | |
| * | | | | | fetch: support SHA256 refsEdward Thomson2023-04-102-11/+13
| | | | | | |
| * | | | | | push: support SHA256 refsEdward Thomson2023-04-101-2/+2
| | | | | | |
| * | | | | | remote: support SHA256 for remote refsEdward Thomson2023-04-101-6/+14
| | | | | | |
| * | | | | | refdb: handle SHA256 referencesEdward Thomson2023-04-103-7/+10
| | | | | | |
| * | | | | | object: sha256 lookupsEdward Thomson2023-04-101-12/+22
| | | | | | |
| * | | | | | config: use sha256 as file checksumEdward Thomson2023-04-101-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config file checksum is only used to detect changes internally -- it is not stored within the repository. Therefore this need not be configurable. Use SHA256 everywhere, regardless of the repository object format.
| * | | | | | packbuilder: write sha256 trailers when expectedEdward Thomson2023-04-102-5/+15
| | | | | | |
| * | | | | | submodule: document OID as "oid" not "SHA1"Edward Thomson2023-04-101-3/+3
| | | | | | |
| * | | | | | oid: support sha256 in tostr_sEdward Thomson2023-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our thread-local sha string buffer should be sized to support SHA256 strings.
| * | | | | | odb_pack: handle sha256 short lookupsEdward Thomson2023-04-101-1/+7
| | | | | | |
| * | | | | | refs: honor sha256 during allocationEdward Thomson2023-04-101-1/+8
| | | | | | |
| * | | | | | index: add sha256 supportEdward Thomson2023-04-109-156/+386
| | | | | | |
| * | | | | | filebuf: configurable hash typeEdward Thomson2023-04-085-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `git_filebuf` hashes contents as its written; allow for SHA1 or SHA256 as that hash. Currently, most callers simply use SHA1 as they do not yet know about SHA256 themselves.
* | | | | | | Merge pull request #6482 from libgit2/ethomson/xdiffEdward Thomson2023-04-1321-4394/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | xdiff: move xdiff to 'deps'
| * | | | | | | xdiff: move xdiff to 'deps'Edward Thomson2023-03-0321-4394/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xdiff is a dependency (from git core) and more properly belongs in the 'deps' directory. Move it there, and add a stub for cmake to resolve xdiff from the system location in the future. (At present, bundled xdiff remains hardcoded.)
* | | | | | | | config: return `GIT_ENOTFOUND` for missing programdataEdward Thomson2023-04-111-2/+5
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the programdata path is missing, ensure that we pass down the `GIT_ENOTFOUND` error to the caller instead of converting it to a generic `-1`.
* | | | | | | repo: honor GIT_CONFIG_* environment variablesEdward Thomson2023-04-041-35/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the repository is opened with `GIT_REPOSITORY_OPEN_FROM_ENV`, honor the `GIT_WORK_TREE` environment variable.
* | | | | | | env: remove the _from_env functionEdward Thomson2023-04-042-227/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the `_git_repository_open_ext_from_env` and make it part of the general repository opening code path. This removes the re-entrancy, and standardizes things like index and config opening to a single place again so that we have predictable ordering of the opening procedure.
* | | | | | | repo: change error messageEdward Thomson2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Could not find repository from ..." doesn't make sense. "Could not find repository _at_ ..." does not indicate that we walked down the path hierarchy, but at least it's more correct.
* | | | | | | Merge pull request #6505 from libgit2/ethomson/extension_madnessEdward Thomson2023-03-271-5/+33
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | repo: don't allow repeated extensions
| * | | | | | | repo: don't allow repeated extensionsEdward Thomson2023-02-251-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a user attempts to add a custom extension that the system already supports, or that is already in their list of custom extensions, de-dup it.