File tree Expand file tree Collapse file tree 5 files changed +1
-34
lines changed Expand file tree Collapse file tree 5 files changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ the Git commands' behavior. The `.git/config` file in each repository
6
6
is used to store the configuration for that repository, and
7
7
`$HOME/.gitconfig` is used to store a per-user configuration as
8
8
fallback values for the `.git/config` file. The file `/etc/gitconfig`
9
- can be used to store a system-wide default configuration. On Windows,
10
- configuration can also be stored in `C:\ProgramData\Git\config`; This
11
- file will be used also by libgit2-based software.
9
+ can be used to store a system-wide default configuration.
12
10
13
11
The configuration variables are used by both the Git plumbing
14
12
and the porcelains. The variables are divided into sections, wherein
Original file line number Diff line number Diff line change 1
1
#include "../git-compat-util.h"
2
2
#include "win32.h"
3
3
#include <conio.h>
4
- #include <shlobj.h>
5
4
#include <wchar.h>
6
5
#include <winioctl.h>
7
6
#include "../strbuf.h"
@@ -2655,20 +2654,3 @@ void mingw_startup()
2655
2654
/* init length of current directory for handle_long_path */
2656
2655
current_directory_len = GetCurrentDirectoryW (0 , NULL );
2657
2656
}
2658
-
2659
- const char * windows_wide_config (void )
2660
- {
2661
- static struct strbuf windows_wide = STRBUF_INIT ;
2662
- if (!windows_wide .len ) {
2663
- wchar_t wbuffer [MAX_PATH ];
2664
- if (SHGetFolderPathW (NULL , CSIDL_COMMON_APPDATA , NULL ,
2665
- SHGFP_TYPE_CURRENT , wbuffer ) != S_OK )
2666
- strbuf_addch (& windows_wide , '\0' );
2667
- else {
2668
- char buffer [MAX_PATH ];
2669
- xwcstoutf (buffer , wbuffer , sizeof (buffer ));
2670
- strbuf_addf (& windows_wide , "%s\\Git\\config" , buffer );
2671
- }
2672
- }
2673
- return * windows_wide .buf ? windows_wide .buf : NULL ;
2674
- }
Original file line number Diff line number Diff line change @@ -390,8 +390,6 @@ static inline char *mingw_find_last_dir_sep(const char *path)
390
390
int mingw_offset_1st_component (const char * path );
391
391
#define offset_1st_component mingw_offset_1st_component
392
392
#define PATH_SEP ';'
393
- extern const char * windows_wide_config (void );
394
- #define git_super_config windows_wide_config
395
393
#ifndef __MINGW64_VERSION_MAJOR
396
394
#define PRIuMAX "I64u"
397
395
#define PRId64 "I64d"
Original file line number Diff line number Diff line change @@ -1204,18 +1204,11 @@ int git_config_system(void)
1204
1204
int git_config_early (config_fn_t fn , void * data , const char * repo_config )
1205
1205
{
1206
1206
int ret = 0 , found = 0 ;
1207
- const char * super_config = git_super_config ();
1208
1207
char * xdg_config = NULL ;
1209
1208
char * user_config = NULL ;
1210
1209
1211
1210
home_config_paths (& user_config , & xdg_config , "config" );
1212
1211
1213
- if (super_config && git_config_system () &&
1214
- !access (super_config , R_OK )) {
1215
- ret += git_config_from_file (fn , super_config , data );
1216
- found += 1 ;
1217
- }
1218
-
1219
1212
if (git_config_system () && !access_or_die (git_etc_gitconfig (), R_OK , 0 )) {
1220
1213
ret += git_config_from_file (fn , git_etc_gitconfig (),
1221
1214
data );
Original file line number Diff line number Diff line change @@ -310,10 +310,6 @@ static inline char *git_find_last_dir_sep(const char *path)
310
310
#define find_last_dir_sep git_find_last_dir_sep
311
311
#endif
312
312
313
- #ifndef git_super_config
314
- #define git_super_config () NULL
315
- #endif
316
-
317
313
#if defined(__HP_cc ) && (__HP_cc >= 61000 )
318
314
#define NORETURN __attribute__((noreturn))
319
315
#define NORETURN_PTR
You can’t perform that action at this time.
0 commit comments