make git barf when an alias changes environment variables
commit4394efecfa9f94ad14fe49bc9f499c5806aa83af
authorMatthias Lederhofer <matled@gmx.net>
Fri, 8 Jun 2007 20:57:55 +0000 (8 22:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Jun 2007 06:04:14 +0000 (12 23:04 -0700)
tree607649031f9410a9bb6903d26c0fffc1a2972253
parentf4f51add2712293b7bc9e7aaebf6a589bb37c7c7
make git barf when an alias changes environment variables

Aliases changing environment variables (GIT_DIR or
GIT_WORK_TREE) can cause problems:
git has to use GIT_DIR to read the aliases from the config.
After running handle_options for the alias the options of the
alias may have changed environment variables.  Depending on
the implementation of setenv the memory location obtained
through getenv earlier may contain the old value or the new
value (or even be used for something else?).  To avoid these
problems git errors out if an alias uses any option which
changes environment variables.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c