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

Re: [PATCH v2 1/2] mingw: introduce the 'core.hideDotFiles' setting

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2016, 17:19 UTC
Message-ID
<xmqqlh3hrfu3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1605101047510.4092@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 16 quoted lines
> On Mon, 9 May 2016, Junio C Hamano wrote:
>
>> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>> 
>> > +core.hideDotFiles::
>> > +	(Windows-only) If true, mark newly-created directories and files whose
>> > +	name starts with a dot as hidden.  If 'dotGitOnly', only the `.git/`
>> > +	directory is hidden, but no other files starting with a dot.  The
>> > +	default mode is to mark only the `.git/` directory as hidden.
>> 
>> I think "The default mode is 'dotGitOnly'" is sufficient, given that
>> it is described just one sentence before, which is still likely to
>> be in readers' mind.  But I'll let it pass without tweaking.
>
> Yeah, when rewriting this after Ramsay pointed out the erroneous
> documentation, I wanted to fail on the crystal-clear side.

Saying the same thing twice in rapid succession does not make it any clearer, though. If you are rerolling anyway, then I think it would be better to shorten it to clarify.

Show 11 quoted lines
>> The other is why you do not have to retry creation in a similar way
>> when !needs_hiding(filename).  I didn't see anything in the function
>> before reaching this point that does anything differently based on
>> needs_hiding().  Can't the same 'ERROR_ACCESS_DENIED' error trigger
>> if CREATE_ALWAYS was specified and file attributes of an existing
>> file match, and if it can, don't you want to retry that too, even if
>> you are not going to hide the filename?
>
> The attributes that can trigger the ERROR_ACCESS_DENIED error are the
> hidden flag and the system flag. Since Git *never* marks any file as
> system file, we should be safe.

I was just wondering Git's trying to open it via this codepath trigger the "if CREATE_ALWAYS was specified and an already existing file's attributes do not match *exactly*.", if the path is already hidden. But again, I am clueless on Windows API, expected use pattern of Git for Windows, and your future project plans (e.g. basing future work on Karsten's clean-up patch), so I defer to your judgment.

> Anyway, the next iteration of this patch is on its way.
OK.  Thanks.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 14 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.