summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* packbuilder: use the packfile name instead of hashethomson/oid_cleanupsEdward Thomson2022-01-236-17/+44
| | | | | Deprecate the `git_packfile_hash` function. Callers should use the new `git_packfile_name` function which provides a unique packfile name.
* indexer: use a byte array for checksumEdward Thomson2022-01-235-31/+53
| | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_indexer_hash` function. Callers should use the new `git_indexer_name` function which provides a unique packfile name.
* index: use a byte array for checksumEdward Thomson2022-01-234-48/+55
| | | | | | | | | | | The index's checksum is not an object ID, so we should not use the `git_oid` type. Use a byte array for checksum calculation and storage. Deprecate the `git_index_checksum` function without a replacement. This is an abstraction that callers should not care about (and indeed do not seem to be using). Remove the unused `git_index__changed_relative_to` function.
* config: use a byte array for checksumEdward Thomson2022-01-221-5/+6
|
* commit_graph: use a byte array for checksumEdward Thomson2022-01-222-12/+20
|
* midx: use a byte array for checksumEdward Thomson2022-01-222-13/+21
|
* hash: introduce git_hash_fmtEdward Thomson2022-01-222-0/+18
| | | | A simple hash-to-hexadigit formatter.
* oid: avoid `tostr_s` in many placesEdward Thomson2022-01-222-2/+8
| | | | | | The `git_oid_tostr_s` helper is indeed helpful, unless you are using printf debugging (by inserting more `git_oid_tostr_s` calls) shortly after using it. Avoid it before invoking complex functions.
* commit_graph: tests are now `commitgraph`Edward Thomson2022-01-221-3/+3
| | | | | | Underscores in filenames in tests indicate a logical separation - so `commit_graph` becomes `commit::graph`. Rename it to `commitgraph` to avoid this.
* Merge pull request #6184 from boretrk/noflexarrayEdward Thomson2022-01-201-9/+7
|\ | | | | diff_driver: split global_drivers array into separate elements
| * diff_driver: split global_drivers array into separate elementsPeter Pettersson2022-01-201-9/+7
| | | | | | | | | | C99 doesn't allow structures with flexible length array to be placed in an array.
* | Merge pull request #6180 from libgit2/ethomson/win32_findfile_fixesEdward Thomson2022-01-1910-107/+796
|\ \ | |/ |/| win32: update git for windows compatibility
| * win32: improve impl & tests for system path / g4w interopethomson/win32_findfile_fixesEdward Thomson2022-01-175-271/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We look for a Git for Windows installation to use its git config, so that clients built on libgit2 can interoperate with the Git for Windows CLI (and clients that are built on top of _it_). Look for `git` both in the `PATH` and in the registry. Use the _first_ git install in the path, and the first git install in the registry. Look in both the `etc` dir and the architecture-specific `etc` dirs (`mingw64/etc` and `mingw32/etc`) beneath the installation root. Prefer the git in the `PATH` to the git location in the registry so that users can override that. Include more tests for this behavior.
| * path: introduce git_fs_path_find_executableEdward Thomson2022-01-175-0/+281
| | | | | | | | | | Provide a helper function to find an executable in the current process's PATH.
| * win32: remove unnecessary findfile structureEdward Thomson2022-01-171-42/+37
| |
| * win32: test system paths for gvfs compatibilityEdward Thomson2022-01-173-26/+144
| |
| * sysdir: allow resetting cached system dirsEdward Thomson2022-01-172-0/+21
| |
| * Correctly detect the share/template folderSven Strickroth2022-01-171-9/+50
| | | | | | | | | | | | | | | | With Git for Windows >= 2 the share folder is in an architecture specific subfolder. This also add support for Git for Windows versions between 2 and 2.24 where also the etc folder is in an architecture specific subfolder. Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * Detect installed x64 versions of Git for WindowsSven Strickroth2022-01-171-0/+6
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * Do not unconditionally remove the last 4 chars of the directory where ↵Sven Strickroth2022-01-171-3/+11
| | | | | | | | | | | | | | | | | | | | git.exe was found Removal of the last 4 chars is only required for Git for Windows installations in order to find the "root" folder of the Git installation. Fixes issue #5127. Signed-off-by: Sven Strickroth <email@cs-ware.de>
| * Prevent possible buffer overflowSven Strickroth2022-01-171-1/+1
| | | | | | | | | | | | Could happen if the path to git.exe is near to MAX_PATH and we append a longer subdir such as "share/git-core" to it. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | Merge pull request #6168 from punkymaniac/patch-documentation-2Edward Thomson2022-01-1732-9/+144
|\ \ | |/ |/| Improve documentation
| * Apply suggestions from code reviewEdward Thomson2022-01-1710-14/+13
| |
| * Set parameter name as function declarationpunkymaniac2022-01-122-2/+2
| |
| * Separate function description from short descriptionpunkymaniac2022-01-111-6/+7
| |
| * Rephrase param descriptionpunkymaniac2022-01-091-1/+1
| |
| * Fix misspelling word "ge" -> "get"punkymaniac2022-01-091-1/+1
| |
| * Document return value for git_libgit2_featurespunkymaniac2022-01-091-0/+3
| |
| * Add documentation about parameter and return valuepunkymaniac2022-01-0930-0/+122
| |
| * Add missing parameter namepunkymaniac2022-01-091-1/+1
| |
| * Add `git_apply_options_init` documentationpunkymaniac2022-01-091-0/+10
| |
* | Merge pull request #6167 from libgit2/ethomson/scp_urls_with_portsEdward Thomson2022-01-1712-158/+645
|\ \ | | | | | | Support scp style paths with ports
| * | ssh: use url parsing functionalityethomson/scp_urls_with_portsEdward Thomson2022-01-171-61/+26
| | | | | | | | | | | | | | | Instead of trying to figure out a repo's path from a URL by hand, parse a URL using the parsing functionality.
| * | url: introduce git_net_str_is_urlEdward Thomson2022-01-173-1/+41
| | | | | | | | | | | | | | | | | | We occasionally need to determine whether a given string is a URL or something else. (The "something else" may be a git path in a different format, like scp formatting, which needs to be handled differently.)
| * | ci: test `[user@host:port]:path` formatsEdward Thomson2022-01-171-5/+15
| | |
| * | url: introduce git_net_url_parse_scpEdward Thomson2022-01-174-38/+515
| | | | | | | | | | | | | | | | | | Provide a mechanism for parsing scp-style paths (eg `git@github.com:libgit2/libgit2` into the url form `ssh://git@github.com/libgit2/libgit2`.)
| * | common: update the error checking macrosEdward Thomson2022-01-171-2/+6
| | |
| * | online: test with https instead of git protocolEdward Thomson2022-01-175-52/+43
| | | | | | | | | | | | | | | GitHub is removing support for the unauthenticated git protocol; test with the https protocol.
* | | Merge pull request #6164 from rex4539/typosEdward Thomson2022-01-1757-82/+82
|\ \ \ | |/ / |/| | Fix typos
| * | Merge branch 'main' into typosEdward Thomson2022-01-1738-596/+1175
| |\ \ | |/ / |/| |
* | | Merge pull request #6175 from libgit2/ethomson/follow_redirects_initialEdward Thomson2022-01-1724-568/+976
|\ \ \ | | | | | | | | remote: support `http.followRedirects` (`false` and `initial`) and follow initial redirects by default
| * | | ci: minor formatting cleanups to test outputethomson/follow_redirects_initialEdward Thomson2022-01-131-2/+3
| | | |
| * | | remote: test honoring configuration optionEdward Thomson2022-01-131-9/+57
| | | | | | | | | | | | | | | | Test that we honor `http.followRedirects` when set to initial or false.
| * | | remote: honor `http.followRedirects` configuration optionEdward Thomson2022-01-134-20/+68
| | | |
| * | | remote: introduce `follow_redirects` connect optionEdward Thomson2022-01-136-4/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Give callers the ability to select how to handle redirects - either supporting redirects during the initial connection (so that, for example, `git.example.com/repo` can redirect to `github.com/example/repo`) or all/no redirects. This is for compatibility with git.
| * | | url: optionally allow off-site redirectsEdward Thomson2022-01-135-26/+47
| | | | | | | | | | | | | | | | In redirect application logic, (optionally) allow off-site redirects.
| * | | ci: stop retrying "flaky" testsEdward Thomson2022-01-131-4/+0
| | | | | | | | | | | | | | | | We (thankfully) don't have flaky tests anymore, don't retry them.
| * | | ci: use poxygit v0.5.1Edward Thomson2022-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | The new version of our test git server adds redirect support. Upgrade to it.
| * | | remote: introduce `git_remote_connect_options`ethomson/remote_connect_optsEdward Thomson2022-01-0617-513/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing mechanism for providing options to remote fetch/push calls, and subsequently to transports, is unsatisfactory. It requires an options structure to avoid breaking the API and callback signatures. 1. Introduce `git_remote_connect_options` to satisfy those needs. 2. Add a new remote connection API, `git_remote_connect_ext` that will take this new options structure. Existing `git_remote_connect` calls will proxy to that. `git_remote_fetch` and `git_remote_push` will proxy their fetch/push options to that as well. 3. Define the interaction between `git_remote_connect` and fetch/push. Connect _may_ be called before fetch/push, but _need not_ be. The semantics of which options would be used for these operations was not specified if you specify options for both connect _and_ fetch. Now these are defined that the fetch or push options will be used _if_ they were specified. Otherwise, the connect options will be used if they were specified. Otherwise, the library's defaults will be used. 4. Update the transports to understand `git_remote_connect_options`. This is a breaking change to the systems API.
| * | | remote: improved error reportingEdward Thomson2022-01-063-8/+8
| | | | | | | | | | | | | | | | | | | | Several places in the remote code identify an error and then swallow it; return the error.