From: Junio C Hamano Date: Wed, 20 Jan 2016 19:43:26 +0000 (-0800) Subject: Merge branch 'nd/clear-gitenv-upon-use-of-alias' X-Git-Tag: v2.8.0-rc0~118 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5135d1c3d2a2c8c6c9701bd0cbcf57ce587f750d;p=thirdparty%2Fgit.git Merge branch 'nd/clear-gitenv-upon-use-of-alias' d95138e6 (setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR, 2015-06-26) attempted to work around a glitch in alias handling by overwriting GIT_WORK_TREE environment variable to affect subprocesses when set_git_work_tree() gets called, which resulted in a rather unpleasant regression to "clone" and "init". Try to address the same issue by always restoring the environment and respawning the real underlying command when handling alias. * nd/clear-gitenv-upon-use-of-alias: run-command: don't warn on SIGPIPE deaths git.c: make sure we do not leak GIT_* to alias scripts setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when .. git.c: make it clear save_env() is for alias handling only --- 5135d1c3d2a2c8c6c9701bd0cbcf57ce587f750d diff --cc git.c index 6ed824cacf,98d441220a..da278c3d41 --- a/git.c +++ b/git.c @@@ -415,9 -416,9 +417,9 @@@ static struct cmd_struct commands[] = { "hash-object", cmd_hash_object }, { "help", cmd_help }, { "index-pack", cmd_index_pack, RUN_SETUP_GENTLY }, - { "init", cmd_init_db, NO_SETUP }, - { "init-db", cmd_init_db, NO_SETUP }, + { "init", cmd_init_db }, + { "init-db", cmd_init_db }, - { "interpret-trailers", cmd_interpret_trailers, RUN_SETUP }, + { "interpret-trailers", cmd_interpret_trailers, RUN_SETUP_GENTLY }, { "log", cmd_log, RUN_SETUP }, { "ls-files", cmd_ls_files, RUN_SETUP }, { "ls-remote", cmd_ls_remote, RUN_SETUP_GENTLY },