tests/win32/longpath.c


Log

Author Commit Date CI Message
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 005c740b 2021-09-20T14:06:09 win32: ensure content filtering occurs in longpath test
Laurence McGlashan 0d30e7bb 2021-09-14T13:07:33 Apply suggestions from code review Co-authored-by: Edward Thomson <ethomson@github.com>
Laurence McGlashan 6cf9a0b3 2021-09-14T12:34:45 Refactor shared code in longpath test.
Laurence McGlashan 26bf94c0 2021-09-14T12:19:54 If longpaths is true and filters are enabled, pass git_repository through the filtering code to ensure the cached longpath setting is returned. Fixes: #6054
Edward Thomson 33667c14 2021-05-05T23:59:05 win32: add file and get status on a long path
Edward Thomson f8921ab9 2021-05-05T23:26:24 win32: ensure core.longpaths is honored for workdir paths
Ian Hattendorf 69c65b9a 2019-12-31T12:38:03 path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAX
Edward Thomson 50e01216 2021-03-20T16:39:29 repo: introduce git_repository_workdir_path 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.
Patrick Steinhardt e54343a4 2019-06-29T09:17:32 fileops: rename to "futils.h" to match function signatures Our file utils functions all have a "futils" prefix, e.g. `git_futils_touch`. One would thus naturally guess that their definitions and implementation would live in files "futils.h" and "futils.c", respectively, but in fact they live in "fileops.h". Rename the files to match expectations.
Edward Thomson f673e232 2018-12-27T13:47:34 git_error: use new names in internal APIs and usage Move to the `git_error` name in the internal API for error-related functions.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Edward Thomson 0d9a39ea 2016-02-12T10:02:18 win32: drop incorrect `const`ness
Patrick Steinhardt 77b79dde 2015-11-24T14:36:46 tests: win32::longpath: free expected_msg
Edward Thomson ea467e74 2015-09-28T16:46:09 win32::longpath: don't print path
Edward Thomson 9768ebb1 2015-09-22T23:24:30 win32: test checkout msg on long path err