summaryrefslogtreecommitdiff
path: root/src/repository.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-03-20 13:01:00 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2021-04-28 13:03:03 +0100
commitdc1ba018289aa40e1948a5fbb673652f86170677 (patch)
tree716f065ad99fd09abe846cc6a8b7a5aff6e87c60 /src/repository.h
parent88323cd0723cf2f6cb6daa1d2fc275a3fdde5efc (diff)
downloadlibgit2-dc1ba018289aa40e1948a5fbb673652f86170677.tar.gz
path: introduce ondisk and workdir path validation
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.
Diffstat (limited to 'src/repository.h')
-rw-r--r--src/repository.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/repository.h b/src/repository.h
index c0a28242a..4df85005c 100644
--- a/src/repository.h
+++ b/src/repository.h
@@ -51,6 +51,7 @@ typedef enum {
GIT_CONFIGMAP_PROTECTHFS, /* core.protectHFS */
GIT_CONFIGMAP_PROTECTNTFS, /* core.protectNTFS */
GIT_CONFIGMAP_FSYNCOBJECTFILES, /* core.fsyncObjectFiles */
+ GIT_CONFIGMAP_LONGPATHS, /* core.longpaths */
GIT_CONFIGMAP_CACHE_MAX
} git_configmap_item;
@@ -116,6 +117,8 @@ typedef enum {
GIT_PROTECTNTFS_DEFAULT = GIT_CONFIGMAP_TRUE,
/* core.fsyncObjectFiles */
GIT_FSYNCOBJECTFILES_DEFAULT = GIT_CONFIGMAP_FALSE,
+ /* core.longpaths */
+ GIT_LONGPATHS_DEFAULT = GIT_CONFIGMAP_FALSE,
} git_configmap_value;
/* internal repository init flags */