Log

Author Commit Date CI Message
Edward Thomson 9324d16e 2021-11-06T16:14:47 cmake: standardize USE_THREADS and USE_NSEC Threading can now be disabled with `USE_THREADS=OFF` instead of `THREADSAFE=OFF` to better support the other cmake semantics. Nanosecond support is the default _if_ we can detect it. This should be our default always - like threads - and people can opt out explicitly.
Edward Thomson ceddeed8 2021-11-11T15:20:50 Merge pull request #6104 from libgit2/ethomson/path path: refactor utility path functions
Edward Thomson 9ab351c0 2021-11-11T15:14:59 Merge pull request #6107 from joshtriplett/refresh-handling Support checking for object existence without refresh
Edward Thomson dfd5b32f 2021-11-11T15:10:37 Merge pull request #6109 from joshtriplett/document-odb-race-free Document that `git_odb` is thread-safe
Josh Triplett 644c763b 2021-11-11T00:30:40 Document that `git_odb` is thread-safe Commit 4ae41f9c639d246d34dac89c3f1d9451c9cfa8d3 made `git_odb` race-free, and added internal locking. Update `docs/threading.md` accordingly, so that APIs built atop libgit2 (e.g. language bindings) can count on this.
Edward Thomson 1a8b2922 2021-11-09T14:15:32 win32: include correct path header
Edward Thomson 62251409 2021-11-01T21:09:17 fs_path: add length with suffix validation
Edward Thomson 91246ee5 2021-11-01T20:14:34 path: use new length validation functions
Edward Thomson 1728e27c 2021-11-01T18:19:56 path: length validation respecting core.longpaths Teach `git_path_is_valid` to respect `core.longpaths`. Add helper methods to validate length and set the error message appropriately.
Edward Thomson 315a43b2 2021-11-01T17:37:06 path: introduce `git_path_str_is_valid` Add a `git_str` based validity check; the existing `git_path_is_valid` defers to it.
Edward Thomson ebacd24c 2021-11-01T13:58:18 fs_path: add long path validation on windows
Edward Thomson 1217c5b2 2021-11-01T21:12:23 fs_path: remove now-unused validation functions
Edward Thomson 434a4610 2021-11-01T09:31:32 fs_path: `validate` -> `is_valid` Since we're returning a boolean about validation, the name is more properly "is valid".
Edward Thomson 95117d47 2021-10-31T09:45:46 path: separate git-specific path functions from util Introduce `git_fs_path`, which operates on generic filesystem paths. `git_path` will be kept for only git-specific path functionality (for example, checking for `.git` in a path).
Edward Thomson dd748dbe 2021-11-01T13:04:40 fs_path: make empty component validation optional
Edward Thomson bef02d3e 2021-11-01T10:57:28 fs_path: introduce `str_is_valid` Provide a mechanism for users to limit the number of characters that are examined; `git_fs_path_str_is_valid` and friends will only examine up to `str->size` bytes. `git_fs_path_is_valid` delegates to these new functions by passing `SIZE_MAX` (instead of doing a `strlen`), which is a sentinel value meaning "look for a NUL terminator".
Edward Thomson 63e36c53 2021-11-01T09:34:32 path: `validate` -> `is_valid` Since we're returning a boolean about validation, the name is more properly "is valid".
Edward Thomson 44ec8b5c 2021-11-09T09:38:53 Merge pull request #6108 from libgit2/ethomson/docs_ci ci: only update docs on push
Edward Thomson 51f6f15d 2021-11-09T09:03:06 ci: only update docs on push Only update the documentation on a `push`. We were previously updating the documentation only when not in a `pull_request`, which meant that we would push documentation updates in manual build triggers.
Josh Triplett f45ff6c9 2021-11-08T17:33:35 Omit trailing comma on enum To accommodate less capable compilers. Co-authored-by: Peter Pettersson <85582231+boretrk@users.noreply.github.com>
Josh Triplett 94cb060c 2021-11-08T14:54:09 Add tests for ODB refresh Add optional refreshing in the fake backend, and count the number of refresh calls if enabled.
Josh Triplett 81662d43 2021-11-08T14:48:45 Support checking for object existence without refresh Looking up a non-existent object currently always invokes `git_odb_refresh`. If looking up a large batch of objects, many of which may legitimately not exist, this will repeatedly refresh the ODB to no avail. Add a `git_odb_exists_ext` that accepts flags controlling the ODB lookup, and add a flag to suppress the refresh. This allows the user to control if and when they refresh (for instance, refreshing once before starting the batch).
Josh Triplett 3993e9ae 2021-11-08T14:00:09 Update documentation for ODB backend refresh logic Commit b1a6c316a6070fac4ab1ec5792979838f7145c39 moved auto-refresh into the pack backend, and added a comment accordingly. Commit 43820f204ea32503b4083e3b6b83f30a0a0031c9 moved auto-refresh back *out* of backends into the ODB layer, but didn't update the comment.
Edward Thomson 358a60e1 2021-10-28T11:27:28 Merge pull request #6100 from mkhl/tests/instead-of-clar libgit2_clar is now libgit2_tests
Martin Kühl f66e7f36 2021-10-28T10:25:09 libgit2_clar is now libgit2_tests in #6083 the test runner was renamed to libgit2_tests, but not all references to the old name were updated. this change changes all of them to use the new name.
Edward Thomson 9b04a307 2021-10-18T08:54:36 Merge pull request #6084 from libgit2/ethomson/cmake cmake: cleanups and consistency
Edward Thomson 52693ab4 2021-09-26T23:11:13 cmake: stylistic refactoring Ensure that we always use lowercase function names, and that we do not have spaces preceding open parentheses, for consistency.
Edward Thomson e1be28c7 2021-09-26T22:02:04 cmake: remove unused STDCALL option The `STDCALL` option was removed; remove the (unreachable) error message.
Edward Thomson 8507bf81 2021-09-26T21:54:08 trace: always enabled There's no need to make tracing opt-in; it should always be included.
Edward Thomson 780faa41 2021-09-26T21:51:16 cmake: allow USE_ICONV on any Unix
Edward Thomson 7f5b0f0c 2021-09-26T21:50:19 cmake: allow ENABLE_REPRODUCIBLE_BUILDS on macOS macOS may support ENABLE_REPRODUCIBLE_BUILDS, allow users to opt-in to it. (Especially since ENABLE_REPRODUCIBLE_BUILDS is not the default.)
Edward Thomson a89db0e7 2021-10-17T17:15:41 Merge pull request #6083 from libgit2/ethomson/clar_no_more
Edward Thomson 4e14d4c6 2021-09-26T22:06:49 cmake: BUILD_CLAR is now BUILD_TESTS Nobody knows what CLAR is. The test building option should be `BUILD_TESTS`.
Edward Thomson e61abdce 2021-10-17T10:20:46 Merge pull request #6078 from libgit2/ethomson/gitstr `git_buf`: now a public-only API (`git_str` is our internal API)
Edward Thomson f0e693b1 2021-09-07T17:53:49 str: introduce `git_str` for internal, `git_buf` is external libgit2 has two distinct requirements that were previously solved by `git_buf`. We require: 1. A general purpose string class that provides a number of utility APIs for manipulating data (eg, concatenating, truncating, etc). 2. A structure that we can use to return strings to callers that they can take ownership of. By using a single class (`git_buf`) for both of these purposes, we have confused the API to the point that refactorings are difficult and reasoning about correctness is also difficult. Move the utility class `git_buf` to be called `git_str`: this represents its general purpose, as an internal string buffer class. The name also is an homage to Junio Hamano ("gitstr"). The public API remains `git_buf`, and has a much smaller footprint. It is generally only used as an "out" param with strict requirements that follow the documentation. (Exceptions exist for some legacy APIs to avoid breaking callers unnecessarily.) Utility functions exist to convert a user-specified `git_buf` to a `git_str` so that we can call internal functions, then converting it back again.
Edward Thomson 5346be3d 2021-09-23T21:16:36 docs: document `git_buf` We have been inconsistent about the way that we handle `git_buf`s provided by users. _Usually_ we require that it has been properly initialized with `GIT_BUF_INIT`, but _sometimes_ we simply overwrite the data in it regardless. And even more rarely, we will grow a user-provided buffer and concatenate data onto it (see `git_diff_format_email`). Document the path forward for `git_buf`, which is that we always require that the buffer is intitialized with `GIT_BUF_INIT`. `git_diff_format_email` will be kept backward compatible but users are encouraged to switch to the new `git_email` APIs.
Edward Thomson 66ffac25 2021-10-17T09:25:47 Merge pull request #6082 from libgit2/ethomson/oid hash: separate hashes and git_oid
Edward Thomson b5a7af28 2021-10-13T21:53:27 Merge pull request #6092 from libgit2/ethomson/diff_rename_limit
Edward Thomson 1738f732 2021-10-13T11:36:07 diff: document updated rename limit
Edward Thomson d174381c 2021-10-13T11:34:56 diff: make the default rename_limit 1000 git's default rename limit is 1000, ours should match.
Edward Thomson f0a09160 2021-10-02T13:50:12 fuzzers: use updated hash functions
Edward Thomson 923364c5 2021-09-30T08:40:29 futils: use a particular hash not a git_oid In `git_futils_readbuffer_updated`, always take a particular hash instead of a `git_oid`. This lets us change the checksum algorithm independently of `git_oid` usage.
Edward Thomson 31ecaca2 2021-09-30T08:11:40 hash: hash functions operate on byte arrays not git_oids Separate the concerns of the hash functions from the git_oid functions. The git_oid structure will need to understand either SHA1 or SHA256; the hash functions should only deal with the appropriate one of these.
Edward Thomson 2a713da1 2021-09-29T21:31:17 hash: accept the algorithm in inputs
Edward Thomson 3fff5970 2021-09-29T21:02:38 hash: don't abbreviate algorithm
Edward Thomson b7bad55e 2021-09-27T16:09:50 v1.3: very very last-minute changelog updates
Edward Thomson 424812e3 2021-09-27T11:23:44 Merge pull request #6071 from 257/examples examples: Free the git_config and git_config_entry after use
Edward Thomson 13f1270a 2021-09-27T08:58:28 v1.3: changelog updates for last-minute changes
Edward Thomson 8c29885e 2021-09-27T08:57:03 Merge pull request #6076 from libgit2/ethomson/oidarray_dispose oidarray: introduce `git_oidarray_dispose`
Edward Thomson b6449de3 2021-09-27T08:39:55 Merge pull request #6075 from libgit2/ethomson/attr_longpaths
Edward Thomson 853ba203 2021-09-27T08:39:39 Merge pull request #6073 from libgit2/ethomson/attr_lookups
Edward Thomson a6f6a9f4 2021-09-26T22:09:37 Merge pull request #6077 from libgit2/ethomson/strarray buf: common_prefix takes a string array
Edward Thomson 7e7cfe8a 2021-09-26T20:20:03 buf: common_prefix takes a string array `git_strarray` is a public-facing type. Change `git_buf_text_common_prefix` to not use it, and just take an array of strings instead.
Edward Thomson 0bd132ab 2021-09-26T17:58:08 oidarray: introduce `git_oidarray_dispose` Since users are disposing the _contents_ of the oidarray, not freeing the oidarray itself, the proper cleanup function is `git_oidarray_dispose`. Deprecate `git_oidarray_free`.
Edward Thomson 46508fe6 2021-09-26T11:28:47 attr_file: don't take the `repo` as an arg The `repo` argument is now unnecessary. Remove it.
Edward Thomson f5a9f0a2 2021-09-25T15:19:22 attr_file: don't validate workdir paths in attr lookups When looking up attributes for a file, we construct an absolute path to the queried file within the working directory so that we can accept both absolute paths and working directory relative paths. We then trim the leading working directory path to give us an in-repo path. Since we only want the in-repo path to look up attributes - and not to read it from disk - we don't need to validate its length.
Edward Thomson 091bd738 2021-09-24T17:00:43 attr: ensure lookups are on repo-relative paths Attribute lookups are done on paths relative to the repository. Fail if erroneously presented with an absolute path.
Edward Thomson 3d8749d3 2021-09-24T16:07:17 checkout: always provide a path for attribute lookup Always pass a working-directory relative path to attribute lookups during checkout.
Edward Thomson 848bd009 2021-09-24T16:05:23 blob: improve `create_from_disk` attribute lookups Resolve absolute paths to be working directory relative when looking up attributes. Importantly, now we will _never_ pass an absolute path down to attribute lookup functions.
Edward Thomson 0f4256b8 2021-09-24T15:23:34 repository: improve `hashfile` for absolute paths When `git_repository_hashfile` is handed an absolute path, it determines whether the path is within the repository's working directory or not. This is necessary when there is no `as_path` specified. If the path is within the working directory, then the given path should be used for attribute lookups (it is the effective `as_path`). If it is not within the working directory, then it is _not_ eligible. Importantly, now we will _never_ pass an absolute path down to attribute lookup functions.
Edward Thomson d6c7ca3e 2021-09-25T14:36:25 win32: posixify the output of p_getcwd Make p_getcwd match the rest of our win32 path handling semantics. (This is currently only used in tests, which is why this disparity went unnoticed.)
Paymon MARANDI 581cfbda 2021-09-23T11:59:52 examples: Free the git_config and git_config_entry after use
Edward Thomson 13690108 2021-09-22T15:31:21 changelog: separate releases with a horizontal rule
Edward Thomson 61bbb2d1 2021-09-22T15:28:23 changelog: fix typo
Edward Thomson 183da2cc 2021-09-22T15:25:53 Merge pull request #6069 from libgit2/ethomson/v1_3 v1.3.0
Edward Thomson e7437162 2021-09-22T08:35:02 v1.3: update version number
Edward Thomson e0531f2c 2021-09-22T08:34:10 v1.3: changelog
Edward Thomson a5644b80 2021-09-22T08:48:17 Merge pull request #6068 from libgit2/ethomson/diff_enum diff: update `GIT_DIFF_IGNORE_BLANK_LINES`
Edward Thomson 1ba7c327 2021-09-21T20:23:44 diff: update `GIT_DIFF_IGNORE_BLANK_LINES` `GIT_DIFF_IGNORE_BLANK_LINES` needs to be within a (signed) int, per the `enum` definition of ISO C.
Edward Thomson efa0d64e 2021-09-21T13:19:10 Merge pull request #6067 from libgit2/ethomson/filter_commit_id filter: use a `git_oid` in filter options, not a pointer
Edward Thomson abd8142c 2021-09-21T12:27:37 Merge pull request #6064 from libgit2/ethomson/ci_libssh2 ci: pull libssh2 from www.libssh2.org
Edward Thomson 825dd544 2021-09-20T12:41:13 ci: pull libssh2 from www.libssh2.org libssh2.org and www.libssh2.org were previously identical; now this is a redirect.
Edward Thomson 5ea2966d 2021-09-21T11:52:05 Merge pull request #6066 from libgit2/ethomson/deprecation Fixes for deprecated APIs
Edward Thomson 90656858 2021-09-21T11:28:39 filter: use a `git_oid` in filter options, not a pointer Using a `git_oid *` in filter options was a mistake; it is a deviation from our typical pattern, and callers in some languages that GC may need very special treatment in order to pass both an options structure and a pointer outside of it.
Edward Thomson 470acc71 2021-09-21T11:01:27 rebase: fix (deprecated) signing test
Edward Thomson 62eb2f83 2021-09-21T10:59:49 email: don't clear buffer in append function `git_email__append_from_diff` is meant to - well, append from a diff. Clearing the buffer, by definition, is not appending. Stop doing that.
Edward Thomson ba01547d 2021-09-20T21:45:10 Merge pull request #6061 from libgit2/ethomson/email Introduce `git_email_create`; deprecate `git_diff_format_email`
Edward Thomson 0a872862 2021-09-20T14:00:36 Merge pull request #6063 from libgit2/ethomson/win32_envvar win32: allow empty environment variables
Edward Thomson 18fc751e 2021-09-20T13:07:37 win32: allow empty environment variables A length of 0 indicates an error and GetLastError() will be set. If GetLastError() is unset then the environment variable has a length of 0.
Edward Thomson 1396a9b5 2021-09-20T12:36:56 Merge pull request #6020 from lolgear/refactoring/stdint_ifdef_condition_has_been_reverted Stdint header condition has been reverted.
Edward Thomson bfdba8ee 2021-09-20T12:19:48 Merge branch 'sathieu/patch-1' into main
Edward Thomson 8e762124 2021-09-20T12:19:05 httpproxy: move empty string test above config The configuration change will override the environment variable, so the environment variable check needs to come first.
Edward Thomson d60872f6 2021-09-20T14:09:37 Merge branch 'longpath_filter_bug' into main
Edward Thomson 005c740b 2021-09-20T14:06:09 win32: ensure content filtering occurs in longpath test
Edward Thomson 482e3853 2021-09-20T14:06:50 Merge remote-tracking branch 'mathworks/longpath_filter_bug' into main
Edward Thomson 0644c2e8 2021-09-20T08:39:46 Merge pull request #6058 from mathworks/proxy_config_with_detached_remote Allow proxy options when connecting with a detached remote.
Edward Thomson 4f5653a4 2021-09-20T08:33:12 Merge pull request #6060 from ccstolley/ccs_merge_bugfix merge: Check file mode when resolving renames
Laurence McGlashan 3bd462a1 2021-09-18T21:08:20 Update remote.c Initialise cfg variable.
Laurence McGlashan c8823fb0 2021-09-18T21:00:48 Apply suggestions from code review Co-authored-by: Edward Thomson <ethomson@github.com>
Edward Thomson 3f36e796 2021-09-18T14:07:18 Merge pull request #6050 from shijinglu/patch-1 Update README.md
Edward Thomson ba3595af 2021-09-13T16:25:00 diff: deprecate diff_format_email `git_diff_format_email` is deprecated in favor of `git_email_create`.
Edward Thomson 67b1d019 2021-09-14T09:49:31 email: include renames by default `git format-patch` includes diffs with rename detection enabled by default when creating emails. Match this behavior.
Edward Thomson 323f222f 2021-09-14T09:44:52 email: include binary diffs by default `git format-patch` includes binary diffs by default when creating emails. Match this behavior.
Edward Thomson c443495b 2021-09-13T13:29:46 diff: use `git_email_create` in `diff_format_email`
Edward Thomson 971ed753 2021-09-13T13:26:55 email: introduce 'append_from_diff' Introduce `git_email__append_from_diff` so that we don't always overwrite the input buffer.
Edward Thomson f407d3fa 2021-09-13T10:51:42 diff_commit_as_email: use `email_create` Move the `git_diff_commit_as_email` function to use `email_create`.
Edward Thomson 3f13d2e8 2021-09-13T10:36:48 email: allow `git_diff_commit_as_email` to take 0 as patch index Allow a `0` patch index and `0` patch count; in this case, simply don't display these in the email.
Edward Thomson 6aa34966 2021-09-13T08:17:21 email: introduce `git_email_create_from_diff` Introduce a function to create an email from a diff and multiple inputs about the source of the diff. Creating an email from a diff requires many more inputs, and should be discouraged in favor of building directly from a commit, and is thus in the `sys` namespace.
Edward Thomson 75d4676a 2021-09-12T17:06:14 email: introduce `git_email_create_from_commit` Create `git_email_*` which will encapsulate email creation and application, and `git_email_create_from_commit` in particular, which creates an email for a single commit.
Laurence McGlashan e994299f 2021-09-16T11:53:32 Update formatting.