Skip to content

Commit 35d9901

Browse files
committed
When initializing .git/, record the current setting of core.hideDotFiles
This is on Windows only, of course. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 37e202e commit 35d9901

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compat/mingw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ void mingw_mark_as_git_dir(const char *dir)
302302
if (hide_dotfiles != HIDE_DOTFILES_FALSE && !is_bare_repository())
303303
if (xutftowcs_path(wdir, dir) < 0 || make_hidden(wdir))
304304
warning("Failed to make '%s' hidden", dir);
305+
git_config_set("core.hideDotFiles",
306+
hide_dotfiles == HIDE_DOTFILES_FALSE ? "false" :
307+
(hide_dotfiles == HIDE_DOTFILES_DOTGITONLY ?
308+
"dotGitOnly" : "true"));
305309
}
306310

307311
int mingw_mkdir(const char *path, int mode)

0 commit comments

Comments
 (0)