Skip to content

Commit 0a11955

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 472e535 commit 0a11955

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
@@ -300,6 +300,10 @@ void mingw_mark_as_git_dir(const char *dir)
300300
if (hide_dotfiles != HIDE_DOTFILES_FALSE && !is_bare_repository())
301301
if (xutftowcs_path(wdir, dir) < 0 || make_hidden(wdir))
302302
warning("Failed to make '%s' hidden", dir);
303+
git_config_set("core.hideDotFiles",
304+
hide_dotfiles == HIDE_DOTFILES_FALSE ? "false" :
305+
(hide_dotfiles == HIDE_DOTFILES_DOTGITONLY ?
306+
"dotGitOnly" : "true"));
303307
}
304308

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

0 commit comments

Comments
 (0)