mirror of
https://github.com/git/git.git
synced 2026-02-12 02:38:53 +00:00
mingw: do not hide bare repositories
As reported in msysGit issue 450 the recent change to set the windows hidden attribute on the .git directory is being applied to bare git directories. This patch excludes bare repositories. Tested-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
This commit is contained in:
committed by
Pat Thoyts
parent
fa9dad956c
commit
210f4e1a10
@@ -293,7 +293,8 @@ static int make_hidden(const char *path)
|
||||
|
||||
void mingw_mark_as_git_dir(const char *dir)
|
||||
{
|
||||
if (hide_dotfiles != HIDE_DOTFILES_FALSE && make_hidden(dir))
|
||||
if (hide_dotfiles != HIDE_DOTFILES_FALSE && !is_bare_repository() &&
|
||||
make_hidden(dir))
|
||||
warning("Failed to make '%s' hidden", dir);
|
||||
git_config_set("core.hideDotFiles",
|
||||
hide_dotfiles == HIDE_DOTFILES_FALSE ? "false" :
|
||||
|
||||
Reference in New Issue
Block a user