Log

Author Commit Date CI Message
Edward Thomson 6bd024aa 2022-06-11T15:38:33 Merge pull request #6309 from ccstolley/ccs_fix_midx_offset midx: fix large offset table check.
Edward Thomson 11b81717 2022-06-11T15:36:37 Merge pull request #6318 from apnadkarni/patch-3 Add link to Tcl bindings for libgit2
Edward Thomson 529aa173 2022-06-11T15:35:42 Merge pull request #6310 from theseion/add-pharo-to-language-bindings chore(docs): Add Pharo to language bindings
apnadkarni f140f69b 2022-06-02T16:15:42 Add link to Tcl bindings for libgit2
Max Leske 25830642 2022-05-22T14:08:34 chore(docs): add Pharo to language bindings
Colin Stolley 97954ee5 2022-05-20T09:06:50 Replace bitwise AND 0x7fffffff with XOR 0x80000000. Though both are correct, this makes it clear that we're dealing with the same value.
Colin Stolley 8a765c72 2022-05-19T16:33:57 midx: fix large object offset table check. It's insufficient to only check if the offset high order bit is set, we must also check to see if object_large_offsets are in use. This bug is causing objects to appear missing because they can't be found in the index.
Carlos Martín Nieto bdab2238 2022-05-03T09:28:43 revparse: adjust reflog test as we move away from the dates The dates we use in `refs::revparse::date` has just passed the ten years, so now everything is beyond ten years, leading to an unexpected commit being returned. Adjust it to 11 years so it all looks fine again.
Edward Thomson 13502d9e 2022-04-25T09:22:02 Merge pull request #6274 from libgit2/ethomson/cli_clone cli: clone
Edward Thomson a1c94e94 2022-04-25T09:15:59 Merge pull request #6277 from cschlack/sys_transport_missing_include Fix missing include
Edward Thomson 70506171 2022-04-25T09:15:11 Merge pull request #6276 from lhchavez/delete-git_transport_smart_proxy_options remote: Delete a now-inexistent API declaration
Edward Thomson 3b52e5f5 2022-04-18T17:12:27 Merge pull request #6265 from libgit2/ethomson/sha256_two sha256: refactoring in preparation for sha256
Christian Schlack a6fb41ff 2022-04-16T14:56:23 Fix missing include
lhchavez 88f24384 2022-04-14T07:18:06 remote: Delete a now-inexistent API declaration 6fc6eeb66c40310086c8f059cae41de69ad4c6da replaced the remote options with `git_remote_connect_options`. The function definitions were removed, but one function declaration remained, causing linker errors if one tried to use it. This change removes the declaration of `git_transport_smart_proxy_option` to better reflect reality.
Edward Thomson 7babe76f 2020-05-12T08:56:55 cli: introduce signal handler Provide a mechanism to add a signal handler for Unix or Win32.
Edward Thomson 8a757ae2 2020-04-04T18:31:00 cli: introduce a clone command
Edward Thomson 48506f2b 2020-04-04T18:29:34 cli: introduce a progress class Provide a class that will display progress information to the console. Initially, it contains callbacks for fetch progress and checkout progress.
Edward Thomson 63970244 2022-04-12T14:11:54 Merge pull request #6266 from libgit2/ethomson/ownership Validate repository directory ownership
Edward Thomson 4161ebdd 2022-04-11T21:31:25 repo: make ownership checks optional Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can disable repository ownership validation.
Edward Thomson fa366921 2022-04-11T15:18:44 repo: honor safe.directory during ownership checks 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.)
Edward Thomson f7f7e835 2022-04-11T13:04:26 repo: refactor global config loader function Pull the global configuration loader out of the symlink check so that it can be re-used.
Edward Thomson 90d2b619 2022-04-11T17:07:20 repo: test configuration ownership validation Test that we prevent opening directories that are not owned by ourselves.
Edward Thomson c0b7f88e 2022-04-11T17:06:55 fs_path: mock ownership checks Provide a mock for file ownership for testability.
Edward Thomson c0dfd1ad 2022-04-11T09:56:26 repo: ensure that repo dir is owned by current user Ensure that the repository directory is owned by the current user; this prevents us from opening configuration files that may have been created by an attacker.
Edward Thomson bf2620bc 2022-04-10T21:29:43 fs_path: refactor ownership checks into current user and system Provide individual file ownership checks for both the current user and the system user, as well as a combined current user and system user check.
Edward Thomson f8821405 2022-01-27T15:19:09 fuzzer: use raw oid data The indexer expects raw oid data, provide it.
Edward Thomson 6d8c7cab 2022-01-21T19:37:53 oid: introduce `git_oid_raw_ncmp`
Edward Thomson 526e8869 2022-01-21T19:17:40 oid: `hashcmp` is now `raw_cmp` We will talk about "raw" oids as untyped blobs of data; use a name for the comparison function that is in keeping with that.
Edward Thomson 7367a9d5 2022-01-22T09:07:26 tests: don't cast raw data to a `git_oid`` Create an object id from raw data instead of casting.
Edward Thomson c569738c 2022-01-22T08:55:41 indexer: write raw id data Don't write the object id structure, write its raw oid data.
Edward Thomson 563751d1 2022-01-22T06:42:50 treecache: write the raw id not the object We explicitly want to write on the id data, not the beginning of the object data, which may contain other information in the future.
Edward Thomson 831e20ac 2022-01-22T06:39:38 oidmap: hash on the id, not the object We explicitly want to hash on the id data, not the beginning of the object data, which may contain other information in the future.
Edward Thomson 590ff981 2022-01-21T19:49:09 oid: don't assume the size of an oid Don't assume that a `git_oid` is a particular size; allocate `sizeof(git_oid)` instead.
Edward Thomson ab042161 2022-01-18T08:12:18 tree: move git_oid into tree entry A tree entry previously pointed directly into the object id within the tree object itself; this is useful to avoid any unnecessary memory copy (and an unnecessary use of 40 bytes per tree entry) but difficult if we change the underlying `git_oid` object to not simply be a raw object id but have additional structure. This commit moves the `git_oid` directly into the tree entry; this simplifies the tree entry creation from user data. We now copy the `git_oid` into place when parsing.
Edward Thomson 71049b4a 2022-01-22T09:03:34 midx: use raw oid data A multi-pack index uses raw oid data, use a byte array to index into them.
Edward Thomson 41d4ac51 2022-01-22T08:49:06 index: use raw oid data The index contains entries with raw oid data, use a byte array for the raw entry data.
Edward Thomson 4fc3ce15 2022-01-22T07:46:41 pack: use raw oid data A packfile contains arrays of raw oid data, use a byte array to index into them.
Edward Thomson c2b3b0d8 2022-01-21T19:38:13 commit_graph: use raw oid data The commit graph contains arrays of raw oid data, use a byte array to index into them.
Edward Thomson 9ffa33a1 2022-01-22T08:48:43 oid: introduce `git_oid_raw_cpy` Now that oids are type-aware, they use their type to understand how many bytes to copy. Some callers may need to copy the raw bytes of the object id. This is equivalent to a memcpy that is a little more semantic.
Edward Thomson 7e8d9be0 2022-04-10T09:45:51 Merge pull request #6260 from lhchavez/midx-fix-ub midx: Fix an undefined behavior (left-shift signed overflow)
Edward Thomson 606afeda 2022-04-10T09:44:41 Merge pull request #6244 from jorio/fix-diff_delta_format_path-crash Fix crash when regenerating a patch with unquoted spaces in filename
Edward Thomson 71bb92b5 2022-04-10T09:25:54 Update src/libgit2/diff_print.c
Edward Thomson 2fc0fcb5 2022-04-06T15:54:14 Merge pull request #6262 from libgit2/ethomson/zero_stat tests: support flaky stat
Edward Thomson e7fce1b5 2022-04-06T10:22:29 tests: support flaky stat The 32-bit ARM QEMU builds are flaky when running `lstat`. Disable those testing `lstat`'s `st_size` temporarily.
Edward Thomson 4e85b4fc 2022-04-05T22:40:43 Merge pull request #6259 from libgit2/ethomson/diff_arm32 diff: don't stat empty file on arm32 (flaky test)
Edward Thomson cd8fde82 2022-04-05T22:40:28 Merge pull request #6258 from libgit2/ethomson/sha256_openssl_dynamic sha256: support dynamically loaded openssl
lhchavez 33b1d3fd 2022-04-05T13:10:33 [midx] Fix an undefined behavior (left-shift signed overflow) There was a missing check to ensure that the `off64_t` (which is a signed value) didn't overflow when parsing it from the midx file. This shouldn't have huge repercusions since the parsed value is immediately validated afterwards, but then again, there is no such thing as "benign" undefined behavior. This change makes all the bitwise arithmetic happen with unsigned types and is only casted to `off64_t` until the very end. Thanks to Taotao Gu for finding and reporting this!
Edward Thomson d8015d28 2022-04-04T13:30:27 Merge pull request #6251 from libgit2/ethomson/oid_fetch fetch: support OID refspec without dst
Edward Thomson 3bd9bb8d 2022-04-04T13:28:40 sha256: support dynamically loaded openssl
Edward Thomson 42093d6a 2022-04-04T11:40:42 diff: don't stat empty file on arm32 (flaky test) Our CI test infrastructure virtualizes arm32 in docker, which is a sometimes imperfect situation. In `diff::workdir::can_diff_empty_file`, avoid the stat to ensure that the file is zero bytes; there is an odd issue running in qemu when emulating arm32 that we should skip.
Edward Thomson db4461d5 2022-03-23T12:45:44 Merge pull request #6144 from libgit2/ethomson/sha256 SHA256: add a SHA256 implementation backend
Edward Thomson 0e30becc 2021-12-13T17:49:57 sha: cast nonsense for obnoxious gcc warnings gcc (mingw) warns when you cast the result of `GetProcAddress`; cast the results to `void *` before casting them to the actual result.
Edward Thomson ce78c83b 2021-12-13T15:31:21 sha: ensure we test both cng and cryptoapi on windows When GIT_SHA1_WIN32 or GIT_SHA256_WIN32 is used, ensure that we test both CryptoNG ("cng") and CryptoAPI.
Edward Thomson 6a7d5d23 2021-12-13T11:54:49 sha: support Win32 for SHA256 Adding SHA256 support prompted an overdue refactoring of some of the unnecessary complexity around the CNG/CryptoAPI abstraction.
Edward Thomson 6b4a6faa 2021-12-12T15:41:47 sha: support OpenSSL for SHA256
Edward Thomson b3e3fa10 2021-12-12T15:34:35 sha: support mbedTLS for SHA256
Edward Thomson 83c27786 2021-12-12T15:14:21 sha: support CommonCrypto for SHA256
Edward Thomson b900981c 2021-12-12T14:25:25 sha: add sha256 algorithm Add support for a SHA256 hash algorithm, and add the "builtin" SHA256 hash engine (from RFC 6234).
Edward Thomson 36df49c2 2021-12-12T14:29:11 sha: GIT_ERROR_SHA1 is deprecated in favor of GIT_ERROR_SHA The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
Edward Thomson c7b189ba 2021-12-12T13:19:36 sha1: refactor folder structure Eliminate the `sha1` folder, move it down into `hash` so that future impelmentations can share common code.
Edward Thomson 8bc998f4 2021-12-12T12:44:13 sha1: remove generic implementation Remove the "generic" implementation; it should never be used; it only existed for a no-dependencies configuration, and our bundled sha1dc satisfies that requirement _and_ is correct.
Edward Thomson fb6d0181 2022-01-22T21:47:03 ---------------------------------
Edward Thomson 3a08bc43 2022-03-23T08:38:23 Merge pull request #6235 from libgit2/ethomson/cli_benchmarks Benchmarking suite
Edward Thomson a9a7967a 2022-03-22T22:16:57 fetch: support OID refspec without dst Support the ability to create a refspec that is a single object ID without a destination.
Edward Thomson 8420ac4b 2022-03-22T23:48:38 Merge pull request #6252 from libgit2/ethomson/bitbucket_clone clone: update bitbucket tests
Edward Thomson a1020a7f 2022-03-22T23:05:48 clone: update bitbucket tests
Edward Thomson 0e530061 2022-03-22T21:07:53 Merge pull request #6246 from bierbaum/wilhelm/fix_extension_validation_string_bug Fix a string concatenation bug when validating extensions
Wilhelm Bierbaum ecc722c3 2022-03-16T10:25:11 Fix a string parsing bug when validating extensions from the configuration As builtin extensions are evaluated in the latter half of `check_valid_extension`, a string `cfg` is concatenated with the static string 'extension.' and the value from `builtin_extension`, before being compared with the configured value. This string is not being cleared while iterating through the names of the extensions. Because there is currently only one extension ('noop'), the bug was never noticible. This patch corrects the behavior by clearing the string on each iteration, as is done in the first block.
Iliyas Jorio d427f952 2022-03-13T17:40:54 diff_delta_format_path: handle null filename This fixes a crash in test cases test_diff_parse__new_file_with_space_and_regenerate_patch and test_diff_parse__delete_file_with_space_and_regenerate_patch
Iliyas Jorio 11866327 2022-03-13T17:36:48 test: add test that regenerates patches with spaces in filename This currently crashes, proposed fix in subsequent commit.
Edward Thomson 2a0d0bd1 2022-03-02T19:53:14 Merge pull request #6238 from libgit2/ethomson/coverity Some minor fixes for issues discovered by coverity
Edward Thomson da0b0354 2022-03-02T19:53:04 Merge pull request #6239 from libgit2/ethomson/cmake_libs cmake: export libraries needed to compile against libgit2
Edward Thomson 4c6eab99 2022-02-22T22:03:08 ci: run benchmark tests nightly
Edward Thomson 93037bab 2022-02-22T22:00:37 tests: add benchmark tests Add a benchmark test suite that wraps hyperfine and is suitable for producing data about test runs of a CLI or A/B testing CLIs.
Edward Thomson e48bb3b7 2022-02-22T21:52:08 ci: allow for build-time (`cmake --build`) options Allow for options in the `cmake --build` phase, so that callers can specify (eg) the config type.
Edward Thomson cfdf36f9 2022-02-22T21:49:15 ci: rename build setup scripts Rename our build setup scripts to include the `build` name so that we can add additional CI setup scripts with no ambiguity.
Edward Thomson b08fe71d 2022-02-27T23:16:05 cmake: export libraries needed to compile against libgit2 If users are using us as a direct dependency (via `add_subdirectory`) then they may want to know the libraries to link to; tell them.
Edward Thomson 073e63d0 2022-02-27T10:05:24 object: validate that `odb_obj` was set
Edward Thomson 241d838f 2022-02-27T10:02:05 http: skip processing when body is null or 0 length Mistakenly `&&` when we should have `||`d.
Edward Thomson 9f0088c4 2022-02-27T09:26:16 fs_path: exit quickly in `dirname_r` failure When we encounter a situation where we need to exit, simply `return -1` instead of trying to set `len = -1` and then jumping to the exit handler, which would erroneously do work based on the `len` value.
Edward Thomson 043a87a0 2022-02-27T09:21:53 refdb: unlock mutex on assertion failure If we're safely asserting (and returning an error to the caller), we should still unlock our mutex.
Edward Thomson d9b041e6 2022-02-27T09:20:58 assert: add `ASSERT_WITH_CLEANUP` Now that we safely assert and return, we may need to be in a place where we need to unlock mutexes or cleanup resources. Provide `ASSERT_WITH_CLEANUP` that permits for this behavior by taking a block.
Edward Thomson e32db9f2 2022-02-27T08:54:09 cli: always give a value to `error`
Edward Thomson 1327dbcf 2022-02-26T15:10:42 Merge pull request #6133 from libgit2/ethomson/cli_redux CLI (redux)
Edward Thomson e427d0a1 2021-11-30T10:33:24 cli: add `hash-object` command Introduce a simple command that emulates `git hash-object`.
Edward Thomson dcabef22 2022-02-21T13:06:43 futils: produce improved error messages
Edward Thomson e7be6b76 2021-11-29T12:04:06 futils: provide an option to read a whole file by fd
Edward Thomson b8771227 2021-11-28T10:32:03 cli: add `cat-file` command Introduce a simple command that emulates `git cat-file`.
Edward Thomson f8e7d8fd 2021-11-26T17:33:38 cli: support `help <command>` Support `help <command>` by re-invoking the command itself with the `--help` argument. This allows us to keep the help logic with the commands itself.
Edward Thomson c6dd82d9 2020-02-23T11:54:33 cli: introduce a help command Add a framework for commands to be defined, and add our first one, "help". When `git2_cli help` is run, the `cmd_help` function will be invoked with the remaining command line arguments. This allows users to invoke `git2_cli help foo` to get information about the `foo` subcommand.
Edward Thomson 8526cbd5 2021-11-26T09:37:29 opt: use a custom function to print usage Our argument parser (https://github.com/ethomson/adopt) includes a function to print a usage message based on the allowed options. Omit this and use a cutom function that understands that we have subcommands ("checkout", "revert", etc) that each have their own options.
Edward Thomson 3a3ab065 2020-05-03T23:13:28 cli: infrastructure for a cli project Introduce a command-line interface for libgit2. The goal is for it to be git-compatible. 1. The libgit2 developers can more easily dogfood libgit2 to find bugs, and performance issues. 2. There is growing usage of libgit2's examples as a client; libgit2's examples should be exactly that - simple code samples that illustrate libgit2's usage. This satisfies that need directly. 3. By producing a client ourselves, we can better understand the needs of client creators, possibly producing a shared "middleware" for commonly-used pieces of client functionality like interacting with external tools. 4. Since git is the reference implementation, we may be able to benefit from git's unit tests, running their test suite against our CLI to ensure correct behavior. This commit introduces a simple infrastructure for the CLI. The CLI is currently links libgit2 statically; this is because the utility layer is required for libgit2 _but_ shares the error state handling with libgit2 itself. There's no obviously good solution here without introducing annoying indirection or more complexity. Until we can untangle that dependency, this is a good step forward. In the meantime, we link the libgit2 object files, but we do not include the (private) libgit2 headers. This constrains the CLI to the public libgit2 interfaces.
Edward Thomson d02f4f7a 2021-11-17T14:31:29 cmake: refactor `add_clar_test` into separate module
Edward Thomson e6d93612 2021-11-16T23:59:43 refactor: move utility tests into util
Edward Thomson 2b09b5d7 2021-11-16T23:47:14 refactor: move headertest into separate test folder
Edward Thomson 25bc84fb 2021-11-16T23:41:00 refactor: move clar into separate directory
Edward Thomson 3344fddc 2021-11-16T23:29:22 refactor: `tests` is now `tests/libgit2` 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.
Edward Thomson 91ba0896 2021-11-15T09:54:00 cmake: rename git2internal target to libgit2 The `git2internal` target is actually the git library; call it such so that IDE users have visibility into it.
Edward Thomson d7b49ed4 2021-11-15T14:54:17 cmake: remove unnecessary xcode hack
Edward Thomson 5fcfada5 2021-11-15T07:45:16 cmake: document CMakeLists.txt hierarchy