Re: [PATCH 4/9] Introduce entry point for launching add--interactive.

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

 



Hi,

On Wed, 5 Sep 2007, Kristian Høgsberg wrote:

> diff --git a/builtin-add.c b/builtin-add.c
> index 3dd4ded..e79e8f7 100644
> --- a/builtin-add.c
> +++ b/builtin-add.c
> @@ -153,6 +154,13 @@ static int git_add_config(const char *var, const char *value)
>  	return git_default_config(var, value);
>  }
>  
> +int interactive_add(void)
> +{
> +	const char *argv[2] = { "add--interactive", NULL };
> +
> +	return run_command_v_opt(argv, RUN_GIT_CMD);
> +}

I'd rather have this in builtin-commit.c, since it is quite funny if 
builtin-add.c has code to fork() and exec() itself (eventually, that 
is) ;-)

> diff --git a/commit.h b/commit.h
> index 467872e..64e1d4b 100644
> --- a/commit.h
> +++ b/commit.h
> @@ -122,4 +122,13 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads,
>  		int depth, int shallow_flag, int not_shallow_flag);
>  
>  int in_merge_bases(struct commit *, struct commit **, int);
> +
> +extern const unsigned char *
> +create_commit(const unsigned char *tree_sha1,
> +	      unsigned char parent_sha1[][20], int parents,
> +	      const char *author_info, const char *committer_info,
> +	      const char *message, int length);
> +
> +extern int interactive_add(void);
> +

Just a guess: you did not want create_commit() to creep in here, right?

Ciao,
Dscho

[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