From: Junio C Hamano Date: Tue, 17 Mar 2020 22:02:20 +0000 (-0700) Subject: Merge branch 'js/builtin-add-i-cmds' into maint X-Git-Tag: v2.25.2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0c344ce578f71aeeee7d40cc01e66f74506ecf9;p=thirdparty%2Fgit.git Merge branch 'js/builtin-add-i-cmds' into maint Minor bugfixes to "git add -i" that has recently been rewritten in C. * js/builtin-add-i-cmds: built-in add -i: accept open-ended ranges again built-in add -i: do not try to `patch`/`diff` an empty list of files --- f0c344ce578f71aeeee7d40cc01e66f74506ecf9 diff --cc add-interactive.c index 6a5048c83e,396066e724..143e694724 --- a/add-interactive.c +++ b/add-interactive.c @@@ -913,10 -918,11 +916,10 @@@ static int run_patch(struct add_i_stat opts->prompt = N_("Patch update"); count = list_and_choose(s, files, opts); - if (count >= 0) { + if (count > 0) { struct argv_array args = ARGV_ARRAY_INIT; + struct pathspec ps_selected = { 0 }; - argv_array_pushl(&args, "git", "add--interactive", "--patch", - "--", NULL); for (i = 0; i < files->items.nr; i++) if (files->selected[i]) argv_array_push(&args,