diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-22 16:13:47 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-23 08:47:08 +0200 |
| commit | a7168b47ee494c52ffe850784be9ad996f80441a (patch) | |
| tree | 290ea63c787104e9bdc36eaf0d0ef0316f6e2abc /src/tree.c | |
| parent | 58ff913a13b840f1f6ee35e71e9d1de3470904ad (diff) | |
| download | libgit2-a7168b47ee494c52ffe850784be9ad996f80441a.tar.gz | |
path: reject .gitmodules as a symlink
Any part of the library which asks the question can pass in the mode to have it
checked against `.gitmodules` being a symlink.
This is particularly relevant for adding entries to the index from the worktree
and for checking out files.
Diffstat (limited to 'src/tree.c')
| -rw-r--r-- | src/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree.c b/src/tree.c index fdf36f850..12622975a 100644 --- a/src/tree.c +++ b/src/tree.c @@ -54,7 +54,7 @@ GIT_INLINE(git_filemode_t) normalize_filemode(git_filemode_t filemode) static int valid_entry_name(git_repository *repo, const char *filename) { return *filename != '\0' && - git_path_isvalid(repo, filename, + git_path_isvalid(repo, filename, 0, GIT_PATH_REJECT_TRAVERSAL | GIT_PATH_REJECT_DOT_GIT | GIT_PATH_REJECT_SLASH); } |
