Show 20 quoted lines
> @@ -1945,3 +1953,99 @@ int run_add_p(struct repository *r, enum add_p_mode mode,
> add_p_state_clear(&s);
> return 0;
> }
> +
> +int run_add_p_index(struct repository *r,
> + struct index_state *index,
> + const char *index_file,
> + struct interactive_options *opts,
> + const char *revision,
> + const struct pathspec *ps)
> +{
> + struct patch_mode mode = {
> + .apply_args = { "--cached", NULL },
> + .apply_check_args = { "--cached", NULL },
> + .prompt_mode = {
> + N_("Stage mode change [y,n,q,a,d%s,?]? "),
> + N_("Stage deletion [y,n,q,a,d%s,?]? "),
> + N_("Stage addition [y,n,q,a,d%s,?]? "),
> + N_("Stage this hunk [y,n,q,a,d%s,?]? ")