Log

Author Commit Date CI Message
Edward Thomson eca9e1cf 2022-02-22T07:17:12 Merge pull request #6228 from libgit2/ethomson/win32_systemdirs win32: `find_system_dirs` does not return `GIT_ENOTFOUND`
Edward Thomson f45121ed 2022-02-21T16:13:52 win32: `find_system_dirs` does not return `GIT_ENOTFOUND` Allow for no Git for Windows installation. When there is no GfW found in the path or registry, `git_win32__find_system_dirs` would return a `GIT_ENOTFOUND`. Callers were not expecting this. Since this is no error, we simply return `0` so that callers can move on with their lives.
Edward Thomson 1551b1f0 2022-02-21T09:06:56 Merge pull request #6226 from libgit2/cmn/update-tips-error remote: do store the update_tips callback error value
Carlos Martín Nieto e35b5e44 2022-02-21T10:34:13 test: add test for the behaviour of update_tips on error
Carlos Martín Nieto 15860aa0 2022-02-21T10:03:06 remote: do store the update_tips callback error value We use `git_error_set_after_callback_function` to determine whether `update_tips` returned an error but do not store its return value making us think it always returns 0. Fix it by adding the common patter of storing it inside the `if` when calling it.
Edward Thomson 83f2a20e 2022-02-18T09:30:18 Merge pull request #6220 from libgit2/ethomson/version meta: update version number to v1.5.0-alpha
Edward Thomson 899fd4c5 2022-02-18T09:30:05 Merge pull request #6223 from libgit2/ethomson/xdiff xdiff: use xdl_free not free
Edward Thomson 1afad26e 2022-02-18T08:51:24 Merge pull request #6219 from apnadkarni/patch-2 Free parent and ref in lg2_commit before returning.
Edward Thomson 4646f1e3 2022-02-18T08:50:53 Merge pull request #6217 from mgorny/sys-httpparser cmake: Fix package name for system http-parser
Edward Thomson b722c45d 2022-02-17T13:55:34 xdiff: use xdl_free not free We've added a lovely abstraction layer in xdiff so that it can call our allocation functions. But it also needs to call our free functions. We missed some `free` calls in `xmerge.c`. Update them to use `xdl_free`. Without this, we will pass a pointer allocated with a custom allocator to the system free function. :bomb:
Edward Thomson b152b030 2022-02-14T10:27:48 meta: document version information for libgit2
Edward Thomson 056fe4be 2022-02-14T07:12:36 meta: provide an accessor for prerelease info
Edward Thomson ae74d5ac 2022-02-14T07:01:43 meta: update version number to v1.5.0-alpha Update the version number in main to v1.5.0-alpha. This helps people understand that the main builds are not part of the v1.4.0 release train. We use "alpha" to indicate builds out of main (or nightlies) as semver v2 requires the prerelease component is compared lexicographically. Thus, our "beta" and "rc" releases should follow.
Ashok P. Nadkarni aab7c0ba 2022-02-14T13:57:07 Free parent and ref in lg2_commit before returning.
Michał Górny 8bc9eda7 2022-02-13T21:23:56 cmake: Fix package name for system http-parser Fix building against system http-parser library by fixing the find_package() argument. It seems to have been accidentally changed from HTTPParser to HTTP_Parser in de178d36f, effectively making the build against system library fail to find it: ``` CMake Warning at cmake/SelectHTTPParser.cmake:3 (find_package): By not providing "FindHTTP_Parser.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "HTTP_Parser", but CMake did not find one. Could not find a package configuration file provided by "HTTP_Parser" with any of the following names: HTTP_ParserConfig.cmake http_parser-config.cmake Add the installation prefix of "HTTP_Parser" to CMAKE_PREFIX_PATH or set "HTTP_Parser_DIR" to a directory containing one of the above files. If "HTTP_Parser" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/CMakeLists.txt:97 (include) CMake Error at cmake/SelectHTTPParser.cmake:11 (message): http-parser support was requested but not found Call Stack (most recent call first): src/CMakeLists.txt:97 (include) ```
Edward Thomson c8450561 2022-02-13T11:55:17 Merge pull request #6216 from libgit2/ethomson/readme meta: show build status for v1.3 and v1.4 branches
Edward Thomson 9c9405df 2022-02-13T11:19:39 meta: show build status for v1.3 and v1.4 branches
Edward Thomson 1d5b9bd8 2022-02-13T11:05:40 Merge pull request #6214 from libgit2/ethomson/v1.4 libgit2 v1.4
Edward Thomson bafd044f 2022-02-13T10:07:49 v1.4: update the changelog
Edward Thomson 5c949d1f 2022-02-13T10:06:15 v1.4: update version numbers
Edward Thomson 5f66aa26 2022-02-13T09:16:09 Merge pull request #6212 from apnadkarni/patch-1 Fix crashes in example programs on Windows (sprintf_s not compatible with snprintf)
apnadkarni 77ef1a6e 2022-02-13T14:11:46 Update common.h
Edward Thomson 4c88b9d3 2022-02-12T21:29:43 release.yml: use sentence case for everything
Edward Thomson aded938e 2022-02-12T21:23:01 Merge pull request #6204 from boretrk/merge_flags merge: fix overlap between GIT_MERGE_FILE_FAVOR__CONFLICTED and GIT_MERGE_FILE_SIMPLIFY_ALNUM
Edward Thomson d99b4019 2022-02-12T14:20:47 Merge pull request #6211 from libgit2/ethomson/release_config meta: add a release configuration file
Edward Thomson 416f7cb3 2022-02-12T10:38:08 Merge pull request #6208 from jorio/fix-stale-filesize-crash diff_file: fix crash if size of diffed file changes in workdir
Edward Thomson e3aad1de 2022-02-12T10:27:12 meta: add a release configuration file Let's let GitHub handle our release notes as much as possible: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
Edward Thomson 4467bd66 2022-02-12T09:09:17 Merge pull request #6207 from libgit2/ethomson/prng mktmp: improve our temp file creation
Edward Thomson 0fbf62cd 2022-02-12T08:46:55 merge: make the internal flags public We made the flags that enable recursive merge internal, on the assumption that nobody would want them and they're hard to reason about. (Giving people an option that nobody wants is just extra noise.) However, it made it hard for _us_ to reason about. There's no good reason to keep it private, let's just make it public and push that cognitive load onto our poor users. But they should expect it, they're dealing with git, after all.
Edward Thomson d2ce981f 2022-02-11T17:54:34 diff: fail generation if a file changes size When we know that we know a file's size, and the file's size changes, fail.
Edward Thomson 359240b6 2022-02-11T17:56:05 diff: indicate when the file size is "valid" When we know the file size (because we're producing it from a working directory iterator, or an index with an up-to-date cache) then set a flag indicating as such. This removes the ambiguity about a 0 file size, which could indicate that a file exists and is 0 bytes, or that we haven't read it yet.
Edward Thomson e86e81c5 2022-02-12T06:58:05 oid: make empty tree id global Move the empty tree ID into a global space so that it can be generally used.
Edward Thomson e1415dc3 2022-02-11T11:02:00 diff_file: test empty workdir file grows after obtaining a diff This test was also provided by @jorio https://github.com/libgit2/libgit2/pull/6208#issuecomment-1034072050
Iliyas Jorio 9aade20b 2022-02-09T19:04:52 diff_file: test workdir file becomes empty after obtaining a diff
Iliyas Jorio 3bac68ff 2022-02-09T18:54:34 diff_file: Apply suggestions from code review Skip new_file_size non-zero test, custom error message if file changed in workdir Co-authored-by: Edward Thomson <ethomson@github.com>
Iliyas Jorio 0a0cd67d 2022-02-08T20:18:15 diff_file: fix crash if size of diffed file changes in workdir "diff_file_content_load_workdir_file()" maps a file from the workdir into memory. It uses git_diff_file.size to determine the size of the memory mapping. If this value goes stale, the mmaped area would be sized incorrectly. This could occur if an external program changes the contents of the file after libgit2 had cached its size. This used to segfault if the file becomes smaller (mmaped area too large). This patch causes diff_file_content_load_workdir_file to fail without crashing if it detects that the file size has changed.
Edward Thomson 1d811f0e 2022-02-11T07:14:54 Merge pull request #6203 from libgit2/ethomson/fetch_by_oid Fetch by object id
Edward Thomson b933c14a 2022-02-08T12:22:15 util: remove `p_mktemp` / `p_mkstemp` We have our own temporary file creation function now in `git_futils_mktmp`, remove the others since they may be terrible on some platforms.
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 86c58a5b 2022-02-07T23:10:38 str: add hexadigit encoding to strings
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 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.
Peter Pettersson fed3fef4 2022-02-07T00:45:44 merge: allocate merge flags for internal use Allocate flags in git_merge_flag_t and git_merge_file_flag_t for internal usage to prevent accidental double allocation.
Peter Pettersson caaa1fdf 2022-02-07T00:58:38 merge: change enum GIT_MERGE_FILE_FAVOR__CONFLICTED to flag GIT_MERGE_FILE__CONFLICTED This is to avoid a possible problem where the value is set to the same as GIT_MERGE_FILE_SIMPLIFY_ALNUM in git_merge_file_flag_t
Edward Thomson d9863fc1 2022-02-06T15:27:34 Merge pull request #6192 from libgit2/ethomson/sha256_preparation SHA256: early preparation
Edward Thomson 9d88300a 2022-02-05T12:35:46 fetch: support oids in fetch specs
Edward Thomson 07264ea7 2022-02-06T14:07:36 fetch: add a test for local fetching
Edward Thomson 37d98aaf 2022-02-06T14:59:24 transport: transports can indicate support for fetch by oid
Edward Thomson 7a00adcc 2022-02-06T14:58:33 remote: introduce git_remote_capabilities Provide a mechanism for (internal) users to determine a remote's capabilities from the transport.
Edward Thomson 923c1652 2022-02-06T09:36:51 transport: add capabilities query function
Edward Thomson b5237767 2022-02-05T10:43:08 remote: refactor update tips function Move the functionality to update an individual tip out of the loop; although the update tip function remains rather gnarly, at least the outer function is a bit less onerous.
Edward Thomson b1e83cca 2022-02-05T09:26:54 remote: refactor ref updating Pull ref updating into its own function for future uses.
Edward Thomson b82d5664 2022-02-05T09:03:37 oid: introduce git_oid__is_hexstr Introduce a function that determines whether a given string is a valid object id (40 chars of hexadigits).
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 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 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 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>