From 0750f13e2f86bbf3b4df728f333e0b323be25141 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Sat, 19 Dec 2015 22:24:05 +0800 Subject: [PATCH] Add %GIT_EXEC_PATH% to %PATH% when launching libgit2 filter executable It is possible that the filter points to a git subcommand, that is located at libexec\git-core Signed-off-by: Sup Yut Sum --- src/Git/Git.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index f43dd2599..540229cdc 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -2173,6 +2173,13 @@ BOOL CGit::CheckMsysGitDir(BOOL bFallback) break; } } + + // Add %GIT_EXEC_PATH% to %PATH% when launching libgit2 filter executable + // It is possible that the filter points to a git subcommand, that is located at libexec\git-core + CString gitExecPath = CGit::ms_MsysGitRootDir; + gitExecPath.Append(_T("libexec\\git-core")); + m_Environment.AddToPath(gitExecPath); + if (git_filter_register("filter", git_filter_filter_new(sh, m_Environment), GIT_FILTER_DRIVER_PRIORITY)) return FALSE; } -- 2.11.4.GIT