From bfc28ce98e3bc2de461facd88a5bb82e68212b73 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 12 May 2013 14:43:59 +0200 Subject: [PATCH] Honor /.tgitconfig also for bare repositories Signed-off-by: Sven Strickroth --- src/TortoiseProc/ProjectProperties.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/TortoiseProc/ProjectProperties.cpp b/src/TortoiseProc/ProjectProperties.cpp index 071443dc7..c12f206ae 100644 --- a/src/TortoiseProc/ProjectProperties.cpp +++ b/src/TortoiseProc/ProjectProperties.cpp @@ -122,6 +122,16 @@ int ProjectProperties::ReadProps(CTGitPath path) CStringA configFile = CUnicodeUtils::GetUTF8(g_Git.m_CurrentDir) + "\\.tgitconfig"; git_config_add_file_ondisk(gitconfig, configFile, 4, FALSE); } + else + { + CString tmpFile = GetTempFile(); + CTGitPath path(_T(".tgitconfig")); + if (g_Git.GetOneFile(_T("HEAD"), path, tmpFile) == 0) + { + CStringA configFile = CUnicodeUtils::GetUTF8(tmpFile); + git_config_add_file_ondisk(gitconfig, configFile, 4, FALSE); + } + } CStringA globalConfigA = CUnicodeUtils::GetUTF8(g_Git.GetGitGlobalConfig()); git_config_add_file_ondisk(gitconfig, globalConfigA.GetBuffer(), 3, FALSE); -- 2.11.4.GIT