+}\r
+\r
+static int convert_slash(char * path)\r
+{\r
+ while(*path)\r
+ {\r
+ if(*path == '\\' )\r
+ *path = '/';\r
+ path++;\r
+ }\r
+}\r
+int git_init()\r
+{\r
+ char *home;\r
+ char path[MAX_PATH+1];\r
+ char *prefix;\r
+ size_t homesize,size,httpsize;\r
+\r
+ // set HOME if not set already\r
+ getenv_s(&homesize, NULL, 0, "HOME");\r
+ if (!homesize)\r
+ {\r
+ _dupenv_s(&home,&size,"USERPROFILE"); \r
+ _putenv_s("HOME",home);\r
+ free(home);\r
+ }\r
+ GetModuleFileName(NULL, path, MAX_PATH);\r
+ convert_slash(path);\r
+\r
+ git_extract_argv0_path(path);\r
+ prefix = setup_git_directory();\r
+ git_config(git_default_config, NULL);\r