From: Karthik Nayak Date: Tue, 14 Oct 2025 13:08:18 GMT Subject: Re: [PATCH v4 10/12] add-patch: add support for in-memory index patching Message-ID: In-Reply-To: <20251001-b4-pks-history-builtin-v4-10-8e61ddb86317@pks.im> Patrick Steinhardt writes: [snip] > @@ -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,?]? ") Missing trailing comma. Rest of the patch looks good. [snip]