| 343 | } |
| 344 | |
| 345 | static void copy_sparse_checkout(const char *worktree_git_dir) |
| 346 | { |
| 347 | char *from_file = repo_git_path(the_repository, "info/sparse-checkout"); |
| 348 | char *to_file = xstrfmt("%s/info/sparse-checkout", worktree_git_dir); |
| 349 | |
| 350 | if (file_exists(from_file)) { |
| 351 | if (safe_create_leading_directories(the_repository, to_file) || |
| 352 | copy_file(to_file, from_file, 0666)) |
| 353 | error(_("failed to copy '%s' to '%s'; sparse-checkout may not work correctly"), |
| 354 | from_file, to_file); |
| 355 | } |
| 356 | |
| 357 | free(from_file); |
| 358 | free(to_file); |
| 359 | } |
| 360 | |
| 361 | static void copy_filtered_worktree_config(const char *worktree_git_dir) |
| 362 | { |
no test coverage detected