Re: [PATCH v5 02/10] add--helper: create builtin helper for interactive add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel Ferreira via GitGitGadget" <gitgitgadget@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux