1 #include "git-compat-util.h"
2 #include "systeminfo.h"
5 static FILE *debug_git_fp
= NULL
;
7 void debug_git(char * format
, ...)
12 GetTempPathW(MAX_PATH
, path
);
13 wcsncat(path
, L
"git_shell_ext_debug.txt", MAX_PATH
);
14 debug_git_fp
= _wfopen(path
, L
"a+");
16 debug_git_fp
= fopen("/tmp/git-cheetah-plugin.log", "a+");
20 /* Check again in case the above debug_git_set_file failed. */
27 va_start(params
, format
);
28 length
= vsnprintf(buffer
, sizeof(buffer
), format
, params
);
30 fwrite(buffer
, sizeof(char), length
, debug_git_fp
);
31 fputc('\n', debug_git_fp
);
36 void debug_git_mbox(char *format
, ...)
41 va_start(params
, format
);
42 vsnprintf(buffer
, sizeof(buffer
), format
, params
);