CommitDlg: Update index using libgit2 incrementally
[TortoiseGit.git] / ext / libgit2-0006-Allow-to-use-PROGRAMDATA-Git-config-file.patch
blobfc58be53507a548ce2225f9c82253560a3de6aca
1 From b1606cfcf3d362246130596e85f9d4ce0e8514f4 Mon Sep 17 00:00:00 2001
2 From: Sven Strickroth <email@cs-ware.de>
3 Date: Sat, 20 Jun 2015 17:00:03 +0200
4 Subject: [PATCH 6/6] Allow to use %PROGRAMDATA%\Git\config file
6 Signed-off-by: Sven Strickroth <email@cs-ware.de>
7 ---
8 src/config.c | 3 +++
9 1 file changed, 3 insertions(+)
11 diff --git a/src/config.c b/src/config.c
12 index 77cf573..12ec5a4 100644
13 --- a/src/config.c
14 +++ b/src/config.c
15 @@ -1082,6 +1082,9 @@ int git_config_find_xdg(git_buf *path)
16 int git_config_find_system(git_buf *path)
18 git_buf_sanitize(path);
19 + /* system config in %PROGRAMDATA%\Git on win32 is named config, see https://github.com/git-for-windows/git/commit/ba8c0399e60807f08f73ce6a394c72c261eb96ce */
20 + if (!git_sysdir_find_system_file(path, "config"))
21 + return 0;
22 return git_sysdir_find_system_file(path, GIT_CONFIG_FILENAME_SYSTEM);
25 --
26 2.4.4.windows.2