1 #include "../git-compat-util.h"
3 FILE *git_fopen(const char *path, const char *mode)
8 if (mode[0] == 'w' || mode[0] == 'a')
9 return fopen(path, mode);
11 if (!(fp = fopen(path, mode)))
14 if (fstat(fileno(fp), &st)) {
19 if (S_ISDIR(st.st_mode)) {