Log

Author Commit Date CI Message
Edward Thomson 97fade4f 2022-02-08T12:19:59 fs_path: use new mktmp to query unicode support
Edward Thomson 53063e77 2022-02-07T23:11:11 futils: use our random function for mktemp `mktemp` on mingw is exceedingly deficient, using a single monotonically increasing alphabetic character and the pid. We need to use our own random number generator for temporary filenames.
Edward Thomson 3c53796c 2022-02-07T19:38:32 rand: introduce git_rand PRNG Introduce `git_rand`, a PRNG based on xoroshiro256**, a fast, all-purpose pseudo-random number generator: https://prng.di.unimi.it The PRNG will be seeded by the system's entropy store when possible, falling back to current time and system data (pid, uptime, etc). Inspiration for this was taken from libressl, but since our PRNG is not used for cryptographic purposes (and indeed currently only generates a unique temp file name that is written in a protected directory), this should be more than sufficient. Our implementation of xoroshiro256** was taken almost strictly from the original author's sources, but was tested against PractRand to ensure that there were no foolish mistranslations: ``` RNG_test using PractRand version 0.94 RNG = RNG_stdin64, seed = unknown test set = core, folding = standard (64 bit) rng=RNG_stdin64, seed=unknown length= 256 megabytes (2^28 bytes), time= 2.9 seconds no anomalies in 210 test result(s) rng=RNG_stdin64, seed=unknown length= 512 megabytes (2^29 bytes), time= 6.2 seconds no anomalies in 226 test result(s) rng=RNG_stdin64, seed=unknown length= 1 gigabyte (2^30 bytes), time= 12.7 seconds no anomalies in 243 test result(s) rng=RNG_stdin64, seed=unknown length= 2 gigabytes (2^31 bytes), time= 25.4 seconds no anomalies in 261 test result(s) rng=RNG_stdin64, seed=unknown length= 4 gigabytes (2^32 bytes), time= 50.6 seconds no anomalies in 277 test result(s) rng=RNG_stdin64, seed=unknown length= 8 gigabytes (2^33 bytes), time= 104 seconds no anomalies in 294 test result(s) ```
Edward Thomson 86c58a5b 2022-02-07T23:10:38 str: add hexadigit encoding to strings
Edward Thomson d299a7aa 2022-02-08T20:42:45 Merge pull request #6205 from ccstolley/ccs_fix_http_push_timeout push: Prepare pack before sending pack header.
Edward Thomson 1e7c8b1f 2022-02-08T20:41:40 Merge pull request #6206 from libgit2/ethomson/odb_write_failures odb: check for write failures
Colin Stolley aceac672 2022-02-08T12:14:50 Rename prepare_pack() to git_packbuilder__prepare()
Colin Stolley 91775854 2022-02-08T18:04:52 Update src/pack-objects.h Co-authored-by: Edward Thomson <ethomson@github.com>
Edward Thomson c19a3c7a 2022-02-07T11:22:04 odb: check for write failures
Colin Stolley 19ec5923 2022-02-07T09:29:40 push: Prepare pack before sending pack header. For large pushes, preparing the pack can take a while. Currently we send the pack header first, followed by preparing the pack and then finally sending the pack. Unfortunately github.com will terminate a git-receive-pack command over http if it is idle for more than 10 seconds. This is easily exceeded for a large push, and so the push is rejected with a Broken Pipe error. This patch moves the pack preparation ahead of sending the pack header, so that the timeout is avoided. prepare_pack() can be called multiple times but will only do the work once, so the original PREPARE_PACK call inside git_packbuilder_foreach() remains.
Edward Thomson d9863fc1 2022-02-06T15:27:34 Merge pull request #6192 from libgit2/ethomson/sha256_preparation SHA256: early preparation
Edward Thomson 4efd6563 2022-02-03T16:39:26 Merge pull request #6196 from libgit2/ethomson/at_revparse revparse: support bare '@'
Edward Thomson 8d967d85 2022-02-03T14:25:15 Merge pull request #6200 from boretrk/c90 C90: add inline macro to xdiff and mbedtls
Peter Pettersson b3384af2 2022-02-03T12:27:01 C90: add inline macro to xdiff and mbedtls
Edward Thomson 61f1e31a 2022-02-02T22:35:18 Merge pull request #6197 from libgit2/ethomson/merge_msg_conflict_comment merge: comment conflicts lines in MERGE_MSG
Edward Thomson 18a477e7 2022-02-02T22:35:07 Merge pull request #6195 from libgit2/ethomson/zdiff3 merge: support zdiff3 conflict styles
Edward Thomson 50fada79 2022-01-31T09:22:17 Merge pull request #6198 from libgit2/ethomson/actions ci: improve the name in CI runs
Edward Thomson 6d668ffd 2022-01-31T08:35:58 ci: improve the name in CI runs
Edward Thomson c0297d47 2022-01-30T22:38:08 merge: comment conflicts lines in MERGE_MSG git has started adding comment markers to its conflict lines in MERGE_MSG. Match that behavior.
Edward Thomson add2dabb 2022-01-30T22:25:59 revparse: support bare '@' A bare '@' revision syntax represents HEAD. Support it as such.
Edward Thomson 46885ac9 2022-01-30T21:20:29 Merge pull request #6153 from arroz/fix/apple-static-lib Disabling setting `CMAKE_FIND_LIBRARY_SUFFIXES` on Apple platforms.
Edward Thomson 84e1e560 2022-01-30T19:22:38 Merge branch 'boretrk/futils_mktmp'
Edward Thomson 4517a48b 2022-01-30T19:21:32 futils: document mktmp's safety
Edward Thomson bc746910 2022-01-30T18:32:32 Merge pull request #6185 from boretrk/noext
Peter Pettersson 53e8deb9 2022-01-23T22:33:37 Remove stray '// TODO'
Peter Pettersson 34e01bd2 2022-01-20T23:07:05 cmake: disable some gnu extensions
Edward Thomson aae54d5b 2022-01-30T13:43:43 Merge pull request #6138 from ccstolley/ccs_packedrefs_fast refs: Speed up packed lookups.
Edward Thomson c629d2a1 2022-01-29T21:02:15 merge: support zdiff3 conflict styles
Edward Thomson 1458fb56 2022-01-29T07:18:26 xdiff: include new xdiff from git Update to the xdiff used in git v2.35.0, with updates to our build configuration to ignore the sort of warnings that we normally care about (signed/unsigned mismatch, unused, etc.) Any git-specific abstraction bits are now redefined for our use in `git-xdiff.h`. It is a (wildly optimistic) hope that we can use that indirection layer to standardize on a shared xdiff implementation.
Edward Thomson 11ef76a9 2022-01-22T13:31:02 index: use a byte array for checksum 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.
Edward Thomson afca16a7 2022-01-22T13:14:59 config: use a byte array for checksum
Edward Thomson c6e1f2bf 2022-01-22T11:53:09 commit_graph: use a byte array for checksum
Edward Thomson b7429e1d 2022-01-22T09:44:17 midx: use a byte array for checksum
Edward Thomson 0e53e55d 2022-01-22T14:18:48 hash: introduce git_hash_fmt A simple hash-to-hexadigit formatter.
Edward Thomson a9fc14b0 2022-01-21T19:43:42 oid: avoid `tostr_s` in many places 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.
Edward Thomson 70d9bfa4 2022-01-22T17:34:36 packbuilder: use the packfile name instead of hash Deprecate the `git_packfile_hash` function. Callers should use the new `git_packfile_name` function which provides a unique packfile name.
Edward Thomson d2458af7 2022-01-22T14:19:13 indexer: use a byte array for checksum 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.
Edward Thomson 74471eef 2022-01-21T19:11:18 commit_graph: tests are now `commitgraph` Underscores in filenames in tests indicate a logical separation - so `commit_graph` becomes `commit::graph`. Rename it to `commitgraph` to avoid this.
Edward Thomson 12c2eef7 2022-01-27T17:40:54 Merge pull request #6187 from libgit2/ethomson/copyright COPYING: remove regex copyright, add PCRE copyright
Edward Thomson f2faa01c 2022-01-22T19:24:18 COPYING: remove regex copyright, add PCRE copyright We now bundle PCRE for our regular expression implementation; include that copyright notice and remove the now-unused regular expression copyright.
Edward Thomson 50eb7d31 2022-01-20T09:09:31 Merge pull request #6184 from boretrk/noflexarray diff_driver: split global_drivers array into separate elements
Edward Thomson 4fead636 2022-01-19T19:15:29 Merge pull request #6180 from libgit2/ethomson/win32_findfile_fixes win32: update git for windows compatibility
Peter Pettersson 5388e0c1 2021-11-23T00:00:32 diff_driver: split global_drivers array into separate elements C99 doesn't allow structures with flexible length array to be placed in an array.
Edward Thomson 258df9c1 2022-01-17T22:03:26 Merge pull request #6168 from punkymaniac/patch-documentation-2 Improve documentation
Edward Thomson 475c6eba 2022-01-17T17:16:02 win32: improve impl & tests for system path / g4w interop 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.
Edward Thomson 925abee9 2022-01-15T20:08:10 path: introduce git_fs_path_find_executable Provide a helper function to find an executable in the current process's PATH.
Edward Thomson 29960649 2022-01-15T14:13:53 win32: remove unnecessary findfile structure
Edward Thomson ecbb01f5 2022-01-17T00:09:13 win32: test system paths for gvfs compatibility
Edward Thomson 796fa0dd 2022-01-16T20:19:07 sysdir: allow resetting cached system dirs
Sven Strickroth 7fd5dfa0 2021-12-25T15:25:15 Correctly detect the share/template folder 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>
Sven Strickroth f3c1bedf 2019-06-28T17:05:57 Detect installed x64 versions of Git for Windows Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth f64568eb 2019-06-28T16:49:58 Do not unconditionally remove the last 4 chars of the directory where 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>
Sven Strickroth 7707caaf 2019-06-28T16:42:21 Prevent possible buffer overflow 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>
Edward Thomson d298059e 2022-01-17T21:41:12 Merge pull request #6167 from libgit2/ethomson/scp_urls_with_ports Support scp style paths with ports
Edward Thomson d50b3464 2022-01-17T21:39:43 Merge pull request #6164 from rex4539/typos Fix typos
Edward Thomson 616628dd 2022-01-17T21:39:35 Merge branch 'main' into typos
Edward Thomson d4232e7c 2022-01-17T21:21:54 Apply suggestions from code review
Edward Thomson 27307ed6 2022-01-11T10:39:57 ssh: use url parsing functionality Instead of trying to figure out a repo's path from a URL by hand, parse a URL using the parsing functionality.
Edward Thomson e02e6a5c 2022-01-11T10:19:40 url: introduce git_net_str_is_url 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.)
Edward Thomson 69134223 2022-01-10T21:14:40 ci: test `[user@host:port]:path` formats
Edward Thomson e2bda60a 2022-01-10T21:12:13 url: introduce git_net_url_parse_scp Provide a mechanism for parsing scp-style paths (eg `git@github.com:libgit2/libgit2` into the url form `ssh://git@github.com/libgit2/libgit2`.)
Edward Thomson 3db53eb1 2022-01-10T21:10:49 common: update the error checking macros
Edward Thomson df4448f2 2022-01-10T21:25:05 online: test with https instead of git protocol GitHub is removing support for the unauthenticated git protocol; test with the https protocol.
Edward Thomson 2bfd8ddc 2022-01-17T21:05:17 Merge pull request #6175 from libgit2/ethomson/follow_redirects_initial remote: support `http.followRedirects` (`false` and `initial`) and follow initial redirects by default
Edward Thomson 6723edc7 2022-01-17T19:36:53 Merge pull request #6179 from boretrk/flags c99: change single bit flags to unsigned
Peter Pettersson a979cf3d 2021-11-17T22:19:47 c99: change single bit flags to unsigned
Peter Pettersson 4ac59728 2022-01-14T01:54:09 futils_mktmp: don't use umask. Previously, we were using `umask(mask = umask(0))` to fetch the current umask in order to apply it to the desired mode, but this is broken in the presence of threads. There is no portable way to directly fetch umask without mutating it. Instead, add a reimplementation of mkstemp that uses a passed-in mode, instead of explicitly chmodding to 0600 like POSIX requires of mkstemp. Fixes: jmgao/pore#46
Peter Pettersson 8d548222 2022-01-14T23:25:27 tests: verify that futils_mktmp respects umask
Colin Stolley 0a72a3ad 2022-01-13T17:43:30 Fix compiler warning on Windows.
Colin Stolley ac07a40a 2022-01-12T16:57:51 Check packed-refs filestamp before reusing mmap. Avoid using a stale mmap() by tracking the filestamp.
Colin Stolley cdf05a1d 2022-01-12T16:28:45 On windows, copy file into memory instead of mmap. Since mmap() on windows locks the file, and this map is long-lived, just copy the file into memory instead. This enables us to keep the lookup() paths the same, while avoiding the downsides of mmap() on windows.
Colin Stolley 60faa631 2022-01-13T17:32:48 Drop redundant check in packed_set_peeling_mode(). Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley d86b9f79 2022-01-13T17:23:01 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley 678c9ddf 2022-01-13T17:22:13 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley b162bb35 2022-01-13T17:20:53 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley c55275ff 2022-01-13T17:20:47 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley 620e3abc 2022-01-13T17:20:27 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley 99fc3d49 2022-01-13T17:20:20 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley c6c6c0bd 2022-01-13T17:20:14 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley d89f1fe5 2022-01-13T17:20:09 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley a0381cf2 2022-01-13T17:20:04 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Colin Stolley 10abd7bc 2022-01-13T17:19:57 Update src/refdb_fs.c Co-authored-by: Edward Thomson <ethomson@github.com>
Edward Thomson f4fec251 2022-01-13T16:54:56 ci: minor formatting cleanups to test output
Edward Thomson adaa037d 2022-01-04T16:18:40 remote: test honoring configuration option Test that we honor `http.followRedirects` when set to initial or false.
Edward Thomson fda59a76 2022-01-04T07:05:20 remote: honor `http.followRedirects` configuration option
Edward Thomson 515daeaf 2022-01-04T06:16:30 remote: introduce `follow_redirects` connect option 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.
Edward Thomson 342e55ac 2021-12-18T10:13:18 url: optionally allow off-site redirects In redirect application logic, (optionally) allow off-site redirects.
Edward Thomson c104a565 2022-01-06T07:56:32 ci: stop retrying "flaky" tests We (thankfully) don't have flaky tests anymore, don't retry them.
Edward Thomson cd261af2 2021-12-18T07:42:44 ci: use poxygit v0.5.1 The new version of our test git server adds redirect support. Upgrade to it.
punkymaniac 7491b3fd 2022-01-12T09:38:09 Set parameter name as function declaration
punkymaniac 4e93ecfa 2022-01-11T15:06:00 Separate function description from short description
Miguel Arroz be320340 2022-01-09T11:59:16 Introduced `LINK_WITH_STATIC_LIBRARIES` per PR comments.
punkymaniac 5c8f7a99 2022-01-09T10:41:24 Rephrase param description
punkymaniac c6ede676 2022-01-09T10:35:42 Fix misspelling word "ge" -> "get"
punkymaniac 58ae4535 2022-01-09T10:29:00 Document return value for git_libgit2_features
punkymaniac 68bc511a 2021-11-26T15:14:56 Add documentation about parameter and return value
punkymaniac 03aed8bc 2021-11-26T14:57:41 Add missing parameter name
punkymaniac f8b26df3 2021-11-26T12:50:40 Add `git_apply_options_init` documentation
Miguel Arroz 7c9f77b4 2022-01-07T19:25:55 Merge branch 'libgit2:main' into fix/apple-static-lib
Edward Thomson 6fc6eeb6 2021-12-24T15:14:38 remote: introduce `git_remote_connect_options` 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.