Commit f3c1bedfa2e5564c60fd6910eace4a44abdf9777

Sven Strickroth 2019-06-28T17:05:57

Detect installed x64 versions of Git for Windows Signed-off-by: Sven Strickroth <email@cs-ware.de>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/win32/findfile.c b/src/win32/findfile.c
index d5dba8c..0dcce14 100644
--- a/src/win32/findfile.c
+++ b/src/win32/findfile.c
@@ -191,6 +191,12 @@ int git_win32__find_system_dirs(git_str *out, const wchar_t *subdir)
 			&buf, HKEY_CURRENT_USER, REG_MSYSGIT_INSTALL_LOCAL, subdir) && buf.size)
 		git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);
 
+#ifdef GIT_ARCH_64
+	if (!win32_find_git_in_registry(
+			&buf, HKEY_LOCAL_MACHINE, REG_MSYSGIT_INSTALL_LOCAL, subdir) && buf.size)
+		git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);
+#endif
+
 	if (!win32_find_git_in_registry(
 			&buf, HKEY_LOCAL_MACHINE, REG_MSYSGIT_INSTALL, subdir) && buf.size)
 		git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);