"Daniel Ferreira via GitGitGadget" <gitgitgad...@gmail.com> writes:

> diff --git a/git.c b/git.c
> index 2dd588674f..cb42591f37 100644
> --- a/git.c
> +++ b/git.c
> @@ -444,6 +444,7 @@ static int run_builtin(struct cmd_struct *p, int argc, 
> const char **argv)
>  
>  static struct cmd_struct commands[] = {
>       { "add", cmd_add, RUN_SETUP | NEED_WORK_TREE },
> +     { "add--helper", cmd_add__helper, RUN_SETUP | NEED_WORK_TREE },
>       { "am", cmd_am, RUN_SETUP | NEED_WORK_TREE },
>       { "annotate", cmd_annotate, RUN_SETUP | NO_PARSEOPT },
>       { "apply", cmd_apply, RUN_SETUP_GENTLY },

When adding a more complex replacement command we often cannot write
RUN_SETUP nor NEED_WORK_TREE here and instead do the job ourselves
in cmd_ourcommand() the hard way.  But because this one is only for
helping "add -i", we can let the git.c::run_builtin() aka "git
potty" do the hard part, which is very nice.

Makes sense so far.

Thanks.

Reply via email to