X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=builtin%2Fcommit.c;h=294dc574cdda59f85e07a136ef1807f18710da3f;hb=5c8c0a0d78b0e0ee50ba13823f0cfbee05334461;hp=e588bc6ad3c66c46ba904c14e39b325055209734;hpb=d0ce4d9024882b5363141288979ea3689eab9998;p=thirdparty%2Fgit.git diff --git a/builtin/commit.c b/builtin/commit.c index e588bc6ad3..294dc574cd 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1463,28 +1463,6 @@ static int git_commit_config(const char *k, const char *v, void *cb) return git_status_config(k, v, s); } -int run_commit_hook(int editor_is_used, const char *index_file, const char *name, ...) -{ - struct argv_array hook_env = ARGV_ARRAY_INIT; - va_list args; - int ret; - - argv_array_pushf(&hook_env, "GIT_INDEX_FILE=%s", index_file); - - /* - * Let the hook know that no editor will be launched. - */ - if (!editor_is_used) - argv_array_push(&hook_env, "GIT_EDITOR=:"); - - va_start(args, name); - ret = run_hook_ve(hook_env.argv,name, args); - va_end(args); - argv_array_clear(&hook_env); - - return ret; -} - int cmd_commit(int argc, const char **argv, const char *prefix) { const char *argv_gc_auto[] = {"gc", "--auto", NULL};