- 28 Apr, 2021 15 commits
-
-
Let `git_path_find_dir` simply take a `git_buf` that contains a directory or a file, instead of trying to both join a path AND then deal with prettifying it or its basename. This allows consumers to join paths themselves (and apply any necessary rules - like fitting within MAX_PATH).
Edward Thomson committed -
Worktree paths need to fix within MAX_PATH always, regardless of `core.longpaths` setting.
Edward Thomson committed -
Validate that working directory paths honor `core.longpaths` where appropriate. Paths to the submodule gitdirs must always honor the operating system length restrictions; `core.longpaths` does not affect gitdir paths.
Edward Thomson committed -
Supply the repository for the filesystem and workdir iterators - for workdir iterators, this is non-null and we can lookup the core.longpaths configuration option. (For regular filesystem iterators, this is NULL, so core.longpaths does not apply.)
Edward Thomson committed -
Edward Thomson committed
-
We should allow attribute files - inside working directories - to have names longer than MAX_PATH when core.longpaths is set. `git_attr_path__init` takes a repository to validate the path with.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
The new git_repository_workdir_path function does error checking on working directory inputs on Windows; use it to construct paths within working directories.
Edward Thomson committed -
Use `git_repository_workdir_path` to generate workdir paths since it will validate the length.
Edward Thomson committed -
Ensure that we are validating working directory paths before we try to write to them.
Edward Thomson committed -
We're not necessarily checking out into the working directory. We could be checking out into an arbitrary location. Ensure that when we are writing conflict data that we do it in the checkout target.
Edward Thomson committed -
Add a simple accessor for workdir paths to get an absolute on-disk path given a repository and a relative path within it. This is useful to avoid copy-pasta `git_buf_joinpath` and to ensure that we validate working directory paths while honoring `core.longpaths` settings.
Edward Thomson committed -
There was no test ensuring that we validate `.git` paths. We do, but let's add a test to make sure that we never regress this.
Edward Thomson committed -
Introduce `git_path_validate_filesystem` which validates (absolute) on-disk paths and `git_path_validate_workdir` to perform validations on (absolute) working directory paths. These functions are useful as there may be system limitations on on-disk paths, particularly on Windows (for example, enforcing MAX_PATH). For working directory paths, these limitations may be per-repository, based on the `core.longpaths` configuration setting.
Edward Thomson committed
-
- 14 Apr, 2021 4 commits
-
-
If we want to validate more and different types of paths, the name `git_path_validate` makes that easier and more expressive. We can add, for example, `git_path_validate_foo` while the current name makes that less ergonomic.
Edward Thomson committed -
Edward Thomson committed
-
Introduce a function to determine the number of Unicode characters in a given UTF-8 string.
Edward Thomson committed -
Move the utf8 functions into a proper namespace `git_utf8` instead of being in the namespaceless `git__` function group. Update them to have out-params first and use `char *` instead of `uint8_t *` to match our API treating strings as `char *` (even if they truly contain `uchar`s inside).
Edward Thomson committed
-
- 10 Mar, 2021 2 commits
-
-
tree: deprecate `git_treebuilder_write_with_buffer`
Edward Thomson committed -
winhttp: skip certificate check if unable to send request
Edward Thomson committed
-
- 04 Mar, 2021 7 commits
-
-
[skip ci]
Edward Thomson committed -
commit-graph: Introduce `git_commit_graph_needs_refresh()`
Edward Thomson committed -
commit-graph: Support lookups of entries in a commit-graph
Edward Thomson committed -
Edward Thomson committed
-
The function `git_treebuilder_write_with_buffer` is unnecessary; it is used internally as part of treebuilder writing, but it has little use to external callers. For callers that repeatedly write a treebuilder, we can supply them with a buffer in the treebuilder struct instead of recreating it. For ourselves, when we want a single buffer in our write loop, we can use an internal function.
Edward Thomson committed -
merge: Check insert_head_ids error in create_virtual_base
Edward Thomson committed -
Check git_signature_dup failure
Edward Thomson committed
-
- 03 Mar, 2021 2 commits
- 02 Mar, 2021 1 commit
-
-
In some circumstances (e.g. when proxies are involved), winhttp will fail to reach the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase. If this occurs, we'll error with ERROR_WINHTTP_INCORRECT_HANDLE_STATE when attempting to query the server certificate context (see https://docs.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsendrequest#remarks). To avoid this, verify that WinHttpSendRequest has reached the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase before checking the certificate. Since we're using WinHTTP in synchronous mode, we know for sure that once WinHttpSendRequest returns we've either sent it successfully or not. NOTE: WINHTTP_CALLBACK_STATUS_SENDING_REQUEST appears to be deprecated with no direct replacement. WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE is only available in async mode, and there doesn't appear to be a method of querying this flag outside of the status callback.
Ian Hattendorf committed
-
- 01 Mar, 2021 1 commit
-
-
Ian Hattendorf committed
-
- 28 Feb, 2021 3 commits
-
-
Fix some typos
Edward Thomson committed -
include: fix typos in comments
Edward Thomson committed -
Fix documentation formating on repository.h
Edward Thomson committed
-
- 22 Feb, 2021 2 commits
-
-
Tobias Nießen committed
-
The enum 'git_repository_init_flag_t', 'git_repository_init_mode_t' and the structure 'git_repository_init_options' does not follow the format used by docurium.
punkymaniac committed
-
- 21 Feb, 2021 1 commit
-
-
index: Check git_vector_dup error in write_entries
Edward Thomson committed
-
- 19 Feb, 2021 1 commit
-
-
This is for extra safety within write_entries
panda committed
-
- 18 Feb, 2021 1 commit
-
-
Edward Thomson committed
-