{"thread":{"id":"38089","subject":"[PATCH] run-command.c: retire unused run_hook_with_custom_index()","startedAt":"2014-12-01T16:43:37Z","lastAt":"2014-12-01T16:43:37Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"252790","messageId":"xmqq61dvqq12.fsf@gitster.dls.corp.google.com","threadId":"38089","inReplyTo":null,"subject":"[PATCH] run-command.c: retire unused run_hook_with_custom_index()","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-12-01T16:43:37Z","receivedAt":"2014-12-01T16:43:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This was originally meant to be used to rewrite run_commit_hook()\nthat only special cases the GIT_INDEX_FILE environment, but the\nrun_hook_ve() refactoring done earlier made the implementation of\nrun_commit_hook() thin and clean enough.\n\nNobody uses this, so retire it as an unfinished clean-up made\nunnecessary.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n run-command.c | 17 -----------------\n run-command.h |  4 ----\n 2 files changed, 21 deletions(-)\n\ndiff --git a/run-command.c b/run-command.c\nindex 35a3ebf..ae36852 100644\n--- a/run-command.c\n+++ b/run-command.c\n@@ -792,20 +792,3 @@ int run_hook_le(const char *const *env, const char *name, ...)\n \n \treturn ret;\n }\n-\n-int run_hook_with_custom_index(const char *index_file, const char *name, ...)\n-{\n-\tconst char *hook_env[3] =  { NULL };\n-\tchar index[PATH_MAX];\n-\tva_list args;\n-\tint ret;\n-\n-\tsnprintf(index, sizeof(index), \"GIT_INDEX_FILE=%s\", index_file);\n-\thook_env[0] = index;\n-\n-\tva_start(args, name);\n-\tret = run_hook_ve(hook_env, name, args);\n-\tva_end(args);\n-\n-\treturn ret;\n-}\ndiff --git a/run-command.h b/run-command.h\nindex ea73de3..9e8cd9c 100644\n--- a/run-command.h\n+++ b/run-command.h\n@@ -53,10 +53,6 @@ LAST_ARG_MUST_BE_NULL\n extern int run_hook_le(const char *const *env, const char *name, ...);\n extern int run_hook_ve(const char *const *env, const char *name, va_list args);\n \n-LAST_ARG_MUST_BE_NULL\n-__attribute__((deprecated))\n-extern int run_hook_with_custom_index(const char *index_file, const char *name, ...);\n-\n #define RUN_COMMAND_NO_STDIN 1\n #define RUN_GIT_CMD\t     2\t/*If this is to be git sub-command */\n #define RUN_COMMAND_STDOUT_TO_STDERR 4\n-- \n2.2.0-133-g5229807\n"}]}