| 1806 | } |
| 1807 | |
| 1808 | static struct option *add_checkout_path_options(struct checkout_opts *opts, |
| 1809 | struct option *prevopts) |
| 1810 | { |
| 1811 | struct option options[] = { |
| 1812 | OPT_SET_INT_F('2', "ours", &opts->writeout_stage, |
| 1813 | N_("checkout our version for unmerged files"), |
| 1814 | 2, PARSE_OPT_NONEG), |
| 1815 | OPT_SET_INT_F('3', "theirs", &opts->writeout_stage, |
| 1816 | N_("checkout their version for unmerged files"), |
| 1817 | 3, PARSE_OPT_NONEG), |
| 1818 | OPT_BOOL('p', "patch", &opts->patch_mode, N_("select hunks interactively")), |
| 1819 | OPT_DIFF_UNIFIED(&opts->patch_context), |
| 1820 | OPT_DIFF_INTERHUNK_CONTEXT(&opts->patch_interhunk_context), |
| 1821 | OPT_BOOL(0, "ignore-skip-worktree-bits", &opts->ignore_skipworktree, |
| 1822 | N_("do not limit pathspecs to sparse entries only")), |
| 1823 | OPT_PATHSPEC_FROM_FILE(&opts->pathspec_from_file), |
| 1824 | OPT_PATHSPEC_FILE_NUL(&opts->pathspec_file_nul), |
| 1825 | OPT_END() |
| 1826 | }; |
| 1827 | struct option *newopts = parse_options_concat(prevopts, options); |
| 1828 | free(prevopts); |
| 1829 | return newopts; |
| 1830 | } |
| 1831 | |
| 1832 | /* create-branch option (either b or c) */ |
| 1833 | static char cb_option = 'b'; |
no test coverage detected