Skip to content
  • Johannes Schindelin's avatar
    mingw: respect core.hidedotfiles = false in git-init again · 28785339
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    This is a brown paper bag. When adding the tests, we actually failed
    to verify that the config variable is heeded in git-init at all. And
    when changing the original patch that marked the .git/ directory as
    hidden after reading the config, it was lost on this developer that
    the new code would use the hide_dotfiles variable before the config
    was read.
    
    The fix is obvious: read the (limited, pre-init) config *before*
    creating the .git/ directory.
    
    Please note that we cannot remove the identical-looking `git_config()`
    call from `create_default_files()`: we create the `.git/` directory
    between those calls. If we removed it, and if the parent directory is
    in a Git worktree, and if that worktree's `.git/config` contained any
    `init.templatedir` setting, we would all of a sudden pick that up.
    
    This fixes https://github.com/git-for-windows/git/issues/789
    
    
    
    Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    28785339