| 672 | } |
| 673 | |
| 674 | static void add_patterns_literal(int argc, const char **argv, |
| 675 | struct pattern_list *pl, |
| 676 | int use_stdin) |
| 677 | { |
| 678 | char *sparse_filename = get_sparse_checkout_filename(); |
| 679 | if (add_patterns_from_file_to_list(sparse_filename, "", 0, |
| 680 | pl, NULL, 0)) |
| 681 | die(_("unable to load existing sparse-checkout patterns")); |
| 682 | free(sparse_filename); |
| 683 | add_patterns_from_input(pl, argc, argv, use_stdin ? stdin : NULL); |
| 684 | } |
| 685 | |
| 686 | static int modify_pattern_list(struct repository *repo, |
| 687 | struct strvec *args, int use_stdin, |
no test coverage detected