Skip to content

Commit 77a801d

Browse files
committed
Merge branch 'jc/hook-cleanup'
Remove unused code. * jc/hook-cleanup: run-command.c: retire unused run_hook_with_custom_index()
2 parents a558344 + 814dd8e commit 77a801d

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

run-command.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -833,20 +833,3 @@ int run_hook_le(const char *const *env, const char *name, ...)
833833

834834
return ret;
835835
}
836-
837-
int run_hook_with_custom_index(const char *index_file, const char *name, ...)
838-
{
839-
const char *hook_env[3] = { NULL };
840-
char index[PATH_MAX];
841-
va_list args;
842-
int ret;
843-
844-
snprintf(index, sizeof(index), "GIT_INDEX_FILE=%s", index_file);
845-
hook_env[0] = index;
846-
847-
va_start(args, name);
848-
ret = run_hook_ve(hook_env, name, args);
849-
va_end(args);
850-
851-
return ret;
852-
}

run-command.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ LAST_ARG_MUST_BE_NULL
5757
extern int run_hook_le(const char *const *env, const char *name, ...);
5858
extern int run_hook_ve(const char *const *env, const char *name, va_list args);
5959

60-
LAST_ARG_MUST_BE_NULL
61-
__attribute__((deprecated))
62-
extern int run_hook_with_custom_index(const char *index_file, const char *name, ...);
63-
6460
#define RUN_COMMAND_NO_STDIN 1
6561
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
6662
#define RUN_COMMAND_STDOUT_TO_STDERR 4

0 commit comments

Comments
 (0)