-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix git init
with core.hidedotfiles
#131
Conversation
/submit |
Submitted as pull.131.git.gitgitgadget@gmail.com |
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 git-for-windows#789 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/submit |
Submitted as pull.131.v2.git.gitgitgadget@gmail.com |
This branch is now known as |
This patch series was integrated into pu via git@b2b8028. |
This patch series was integrated into pu via git@e907134. |
This patch series was integrated into pu via git@244a95b. |
This patch series was integrated into pu via git@980d11e. |
This patch series was integrated into pu via git@bc7ca16. |
This patch series was integrated into pu via git@521a344. |
This patch series was integrated into pu via git@d0a9f6c. |
This patch series was integrated into pu via git@cb17ca7. |
This patch series was integrated into pu via git@597fe3f. |
This patch series was integrated into pu via git@e539234. |
This patch series was integrated into next via git@1d57688. |
This patch series was integrated into pu via git@6364386. |
This patch series was integrated into next via git@6364386. |
This patch series was integrated into master via git@6364386. |
Closed via 6364386. |
This fixes an regression that was not present in Git for Windows's original
core.hideDotFiles
patch, but in the shape of thecore.hideDotFiles
patch that made it into git.git.We fixed it in one big hurry in Git for Windows, and I simply forgot to upstream this right away.
Changes since v1:
core.hidedotfiles
in the firstgit_config()
call.git_config(git_init_db_config, NULL)
call fromcreate_default_files()
: it would cause a change of behavior with regard to theinit.templatedir
setting.