git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2016, 19:06 UTC
Message-ID
<xmqqr3dhhcd7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<17d30bb680a0452efd7b3c4f42e2f94478a86273.1462372716.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 12 quoted lines
> diff --git a/builtin/init-db.c b/builtin/init-db.c
> index b2d8d40..c4269ac 100644
> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -370,6 +370,7 @@ int init_db(const char *template_dir, unsigned int flags)
>  	check_repository_format();
>  
>  	reinit = create_default_files(template_dir);
> +	mark_as_git_dir(get_git_dir());
>  
>  	create_object_directory();
>  

I agree with the goal of the change, but I am having a hard time justifying this addition. Primarily because I do not understand the need for this.

In order to be prepared to handle HIDE_DOTFILES_TRUE case, mingw_mkdir() needs to be taught about needs_hiding() and make_hidden() already. Why isn't it sufficient to teach needs_hiding() to check with !strcmp(basename(path, ".git")) under HIDE_DOTFILES_DOTGITONLY?

I do not understand why core.hideDotFiles needs to be explicitly copied to the config file in the resulting repository, either.

Once you created a repository, Git won't unhide the hidden .git of that reposiotry, so the idea must be to propagate the setting to a new repository that will further be created, but wouldn't that get the "please hide" preference from the same place as we have got the preference to hide .git when the current repository was created anyway?

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 27 in “mingw: introduce the 'core.hideDotFiles' setting”
  1. mingw: introduce the 'core.hideDotFiles' settingJohannes Schindelin, May 4, 2016
  2. Ramsay JonesMay 4, 2016
  3. Johannes SchindelinMay 6, 2016
  4. Junio C HamanoMay 4, 2016
  5. Johannes SchindelinMay 6, 2016
  6. Junio C HamanoMay 6, 2016
  7. Junio C HamanoMay 6, 2016
  8. Johannes SchindelinMay 7, 2016
  9. Johannes SchindelinMay 7, 2016
  10. 0/2 Support marking .git/ (or all files) as hidden on WindowsJohannes Schindelin, May 7, 2016
  11. 1/2 mingw: introduce the 'core.hideDotFiles' settingJohannes Schindelin, May 7, 2016
  12. Junio C HamanoMay 9, 2016
  13. Johannes SchindelinMay 10, 2016
  14. Junio C HamanoMay 10, 2016
  15. Johannes SchindelinMay 11, 2016
  16. 2/2 mingw: remove unnecessary definitionJohannes Schindelin, May 7, 2016
  17. Junio C HamanoMay 9, 2016
  18. Johannes SchindelinMay 10, 2016
  19. Junio C HamanoMay 10, 2016
  20. Johannes SchindelinMay 11, 2016
  21. 0/2 Support marking .git/ (or all files) as hidden on WindowsJohannes Schindelin, May 10, 2016
  22. 1/2 mingw: introduce the 'core.hideDotFiles' settingJohannes Schindelin, May 10, 2016
  23. 2/2 mingw: remove unnecessary definitionJohannes Schindelin, May 10, 2016
  24. 0/2 Support marking .git/ (or all files) as hidden on WindowsJohannes Schindelin, May 11, 2016
  25. 0/2 Support marking .git/ (or all files) as hidden on WindowsJohannes Schindelin, May 11, 2016
  26. 1/2 mingw: introduce the 'core.hideDotFiles' settingJohannes Schindelin, May 11, 2016
  27. 2/2 mingw: remove unnecessary definitionJohannes Schindelin, May 11, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.