diff options
Diffstat (limited to 'builtin-commit.c')
| -rw-r--r-- | builtin-commit.c | 34 | 
1 files changed, 0 insertions, 34 deletions
| diff --git a/builtin-commit.c b/builtin-commit.c index b159af2e54..7aaa5304c7 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -361,40 +361,6 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int  	return s.commitable;  } -static int run_hook(const char *index_file, const char *name, ...) -{ -	struct child_process hook; -	const char *argv[10], *env[2]; -	char index[PATH_MAX]; -	va_list args; -	int i; - -	va_start(args, name); -	argv[0] = git_path("hooks/%s", name); -	i = 0; -	do { -		if (++i >= ARRAY_SIZE(argv)) -			die ("run_hook(): too many arguments"); -		argv[i] = va_arg(args, const char *); -	} while (argv[i]); -	va_end(args); - -	snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file); -	env[0] = index; -	env[1] = NULL; - -	if (access(argv[0], X_OK) < 0) -		return 0; - -	memset(&hook, 0, sizeof(hook)); -	hook.argv = argv; -	hook.no_stdin = 1; -	hook.stdout_to_stderr = 1; -	hook.env = env; - -	return run_command(&hook); -} -  static int is_a_merge(const unsigned char *sha1)  {  	struct commit *commit = lookup_commit(sha1); | 
