Skip to content

Commit

Permalink
win32: ensure core.longpaths is honored for workdir paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ethomson committed May 5, 2021
1 parent 69c65b9 commit f8921ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/win32/longpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@ void test_win32_longpath__workdir_path_validated(void)
/* even if the repo path is a drive letter, this is too long */
cl_git_fail(git_repository_workdir_path(&out, repo, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt"));
cl_assert(git__prefixcmp(git_error_last()->message, "path too long") == 0);

cl_repo_set_bool(repo, "core.longpaths", true);
cl_git_pass(git_repository_workdir_path(&out, repo, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.txt"));
git_buf_dispose(&out);
#endif
}

0 comments on commit f8921ab

Please sign in to comment.