run-command.c: retire unused run_hook_with_custom_index()
This was originally meant to be used to rewrite run_commit_hook() that only special cases the GIT_INDEX_FILE environment, but the run_hook_ve() refactoring done earlier made the implementation of run_commit_hook() thin and clean enough. Nobody uses this, so retire it as an unfinished clean-up made unnecessary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 1, 2014 at 08:39 UTC
814dd8e07890c442480c5aacff9a7f1d10beb062
2 files changed
-21
run-command.c
-17
@@ -792,20 +792,3 @@ int run_hook_le(const char *const *env, const char *name, ...)
792
793
return ret;
794
}
795
-
796
-int run_hook_with_custom_index(const char *index_file, const char *name, ...)
797
-{
798
- const char *hook_env[3] = { NULL };
799
- char index[PATH_MAX];
800
- va_list args;
801
- int ret;
802
-
803
- snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file);
804
- hook_env[0] = index;
805
-
806
- va_start(args, name);
807
- ret = run_hook_ve(hook_env, name, args);
808
- va_end(args);
809
-
810
- return ret;
811
-}
run-command.h
-4
@@ -53,10 +53,6 @@ LAST_ARG_MUST_BE_NULL
53
extern int run_hook_le(const char *const *env, const char *name, ...);
54
extern int run_hook_ve(const char *const *env, const char *name, va_list args);
55
56
-LAST_ARG_MUST_BE_NULL
57
-__attribute__((deprecated))
58
-extern int run_hook_with_custom_index(const char *index_file, const char *name, ...);
59
-
56
#define RUN_COMMAND_NO_STDIN 1
57
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
58
#define RUN_COMMAND_STDOUT_TO_STDERR 4