summaryrefslogtreecommitdiff
path: root/t/t5100/msg0014
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2017-03-13 21:11:12 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-14 14:24:16 -0700
commit1a27409ae81120c1f2d8e6983b58a53293265491 (patch)
treea276ddbeffaece9a036ebd9671f9b395f5720c84 /t/t5100/msg0014
parentread_early_config(): avoid .git/config hack when unneeded (diff)
downloadtgif-1a27409ae81120c1f2d8e6983b58a53293265491.tar.xz
read_early_config(): really discover .git/
Earlier, we punted and simply assumed that we are in the top-level directory of the project, and that there is no .git file but a .git/ directory so that we can read directly from .git/config. However, that is not necessarily true. We may be in a subdirectory. Or .git may be a gitfile. Or the environment variable GIT_DIR may be set. To remedy this situation, we just refactored the way setup_git_directory() discovers the .git/ directory, to make it reusable, and more importantly, to leave all global variables and the current working directory alone. Let's discover the .git/ directory correctly in read_early_config() by using that new function. This fixes 4 known breakages in t7006. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100/msg0014')
0 files changed, 0 insertions, 0 deletions