difftool: avoid $GIT_DIR and $GIT_WORK_TREE
commit98f917ed421a477e0575c58f801ac25f0e261b9d
authorDavid Aguilar <davvid@gmail.com>
Tue, 19 Jul 2016 03:57:55 +0000 (18 20:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jul 2016 21:01:55 +0000 (28 14:01 -0700)
treeaa3aebc79d863ff65ce5353b52d05aed7d68d746
parent9ec26e797781239b36ebccb87c590e5778358007
difftool: avoid $GIT_DIR and $GIT_WORK_TREE

Environment variables are global and hard to reason about.
Use the `--git-dir` and `--work-tree` arguments when invoking `git`
instead of relying on the environment.

Add a test to ensure that difftool's dir-diff feature works when these
variables are present in the environment.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-difftool.perl
t/t7800-difftool.sh