[PATCH 2/6] commit: fix patch hunk editing with commit -p -m

2014-03-06 Thread Benoit Pierre
Don't change git environment: move the GIT_EDITOR=: override to the hook command subprocess, like it's already done for GIT_INDEX_FILE. Signed-off-by: Benoit Pierre benoit.pie...@gmail.com --- builtin/commit.c | 35 --- builtin/merge.c

Re: [PATCH 2/6] commit: fix patch hunk editing with commit -p -m

2014-03-06 Thread Junio C Hamano
Benoit Pierre benoit.pie...@gmail.com writes: +int run_commit_hook(int editor_is_used, const char *index_file, const char *name, ...) +{ + const char *hook_env[3] = { NULL }; + char index[PATH_MAX]; + va_list args; + int ret; + + snprintf(index, sizeof(index),