summaryrefslogtreecommitdiff
path: root/tests/win32
Commit message (Collapse)AuthorAgeFilesLines
* str: introduce `git_str` for internal, `git_buf` is externalethomson/gitstrEdward Thomson2021-10-172-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* win32: ensure content filtering occurs in longpath testEdward Thomson2021-09-201-4/+23
|
* Apply suggestions from code reviewLaurence McGlashan2021-09-141-0/+2
| | | Co-authored-by: Edward Thomson <ethomson@github.com>
* Refactor shared code in longpath test.Laurence McGlashan2021-09-141-22/+12
|
* If longpaths is true and filters are enabled, pass git_repository through ↵Laurence McGlashan2021-09-141-0/+28
| | | | | | the filtering code to ensure the cached longpath setting is returned. Fixes: #6054
* win32: add file and get status on a long pathEdward Thomson2021-05-061-1/+31
|
* win32: ensure core.longpaths is honored for workdir pathsEdward Thomson2021-05-061-0/+4
|
* path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAXIan Hattendorf2021-05-051-21/+1
|
* repo: introduce git_repository_workdir_pathEdward Thomson2021-04-281-0/+16
| | | | | | | 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.
* fileops: rename to "futils.h" to match function signaturesPatrick Steinhardt2019-07-201-1/+1
| | | | | | | | | 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.
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-221-1/+1
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-1/+1
|
* Merge pull request #3613 from ethomson/fixupsCarlos Martín Nieto2016-02-181-1/+1
|\ | | | | Remove most of the silly warnings
| * win32: drop incorrect `const`nessEdward Thomson2016-02-161-1/+1
| |
* | win32: tests around handling forbidden pathsEdward Thomson2016-02-171-0/+183
|/ | | | | | | | | | | | | Introduce a repository that contains some paths that were illegal on PC-DOS circa 1981 (like `aux`, `con`, `com1`) and that in a bizarre fit of retrocomputing, remain illegal on some "modern" computers, despite being "new technology". Introduce some aspirational tests that suggest that we should be able to cope with trees and indexes that contain paths that would be illegal on the filesystem, so that we can at least diff them. Further ensure that checkout will not write a repository with forbidden paths.
* tests: win32::longpath: free expected_msgPatrick Steinhardt2015-11-241-0/+2
|
* win32::longpath: don't print pathlongpath-printfEdward Thomson2015-09-281-2/+0
|
* win32: test checkout msg on long path errEdward Thomson2015-09-231-0/+62