- 05 May, 2021 4 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
Ian Hattendorf committed
-
Edward Thomson committed
-
- 04 May, 2021 2 commits
-
-
ci: use GitHub for storing mingw-w64 build dependency
Edward Thomson committed -
Edward Thomson committed
-
- 02 May, 2021 1 commit
-
-
Working directory path validation
Edward Thomson committed
-
- 28 Apr, 2021 18 commits
-
-
Ensure that a repository's path (at initialization or open time) is valid. On Windows systems, this means that the longest known path beneath the repository will fit within MAX_PATH: this is a lock file for a loose object within the repository itself. Other paths, like a very long loose reference, may fail to be opened after the repository is opened. These variable length paths will be checked when they are accessed themselves. This new functionality is done at open to prevent needlessly checking every file in the gitdir (eg, `MERGE_HEAD`) for its length when we could instead check once at repository open time.
Edward Thomson committed -
Edward Thomson committed
-
On Windows, we need to enforce MAX_PATH for loose references and their reflogs. Ensure that any path - including the lock file - would fit within the 260 character maximum. We do not honor core.longpaths for loose reference files or reflogs. core.longpaths only applies to paths in the working directory.
Edward Thomson committed -
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
-
- 20 Apr, 2021 1 commit
-
-
src: fix typos in header files
Edward Thomson committed
-
- 18 Apr, 2021 1 commit
-
-
Tobias Nießen 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
-
- 13 Apr, 2021 5 commits
-
-
repo: remove an inappropriate use of PASSTHROUGH
Edward Thomson committed -
repo: specify init.defaultbranch is meant to be a branch name
Edward Thomson committed -
tests: fix variable name in list.c
Edward Thomson committed -
Fix diff_entrycount -> diff_num_deltas doc typo
Edward Thomson committed -
This just fixes a typo in the documentation, actual rename change was done in 5f69a31f
Marco Sirabella committed
-
- 11 Apr, 2021 3 commits
-
-
Tobias Nießen committed
-
We don't want the default branch's refname here but its name as branch. Returning an error saying it's not a valid reference here suggests we want the value of `init.defaultbranch` to be something like `refs/heads/default` which is not the case.
Carlos Martín Nieto committed -
This error code is for callbacks where we should act as though the callback was not set. This is not something that makes sense for a `_foreach` and checking for that error message to bubble up mostly is happenstance precisely because this is not an error code we expect in the callback. As part of removing this, let's also remove a use of foreach as we can open-code this check.
Carlos Martín Nieto committed
-
- 02 Apr, 2021 1 commit
-
-
Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string
Edward Thomson committed
-