Commit Graph

17 Commits

Author SHA1 Message Date
Edward Thomson
005c740b15 win32: ensure content filtering occurs in longpath test 2021-09-20 14:09:00 +01:00
Laurence McGlashan
0d30e7bb3d Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@github.com>
2021-09-14 13:07:33 +01:00
Laurence McGlashan
6cf9a0b3ee Refactor shared code in longpath test. 2021-09-14 12:34:45 +01:00
Laurence McGlashan
26bf94c07b 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
2021-09-14 12:19:54 +01:00
Edward Thomson
33667c14eb win32: add file and get status on a long path 2021-05-06 00:50:18 +01:00
Edward Thomson
f8921ab957 win32: ensure core.longpaths is honored for workdir paths 2021-05-06 00:48:41 +01:00
Ian Hattendorf
69c65b9a45 path: bump most Win32 unicode buffer sizes from MAX_PATH to GIT_PATH_MAX 2021-05-05 23:13:35 +01:00
Edward Thomson
50e0121636 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.
2021-04-28 13:03:33 +01:00
Patrick Steinhardt
e54343a402 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.
2019-07-20 19:11:20 +02:00
Edward Thomson
f673e232af git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related
functions.
2019-01-22 22:30:35 +00:00
Patrick Steinhardt
ecf4f33a4e Convert usage of git_buf_free to new git_buf_dispose 2018-06-10 19:34:37 +02:00
Carlos Martín Nieto
5663d4f691 Merge pull request #3613 from ethomson/fixups
Remove most of the silly warnings
2016-02-18 12:31:56 +01:00
Edward Thomson
4be2aa57c9 win32: tests around handling forbidden paths
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.
2016-02-17 13:10:33 +00:00
Edward Thomson
0d9a39eaf5 win32: drop incorrect constness 2016-02-16 11:50:45 +00:00
Patrick Steinhardt
77b79dde84 tests: win32::longpath: free expected_msg 2015-11-24 15:21:52 +01:00
Edward Thomson
ea467e7487 win32::longpath: don't print path 2015-09-28 16:46:09 -04:00
Edward Thomson
9768ebb1f3 win32: test checkout msg on long path err 2015-09-23 08:27:24 -04:00