From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Ramsay Jones <ramsay@ramsayjones.plus.com>,
Erik Faye-Lund <kusmabite@googlemail.com>,
Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: Re: [PATCH v2 1/2] mingw: introduce the 'core.hideDotFiles' setting
Date: Tue, 10 May 2016 10:19:16 -0700 [thread overview]
Message-ID: <xmqqlh3hrfu3.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1605101047510.4092@virtualbox> (Johannes Schindelin's message of "Tue, 10 May 2016 13:58:07 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 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.
>> 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.
next prev parent reply other threads:[~2016-05-10 17:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 14:40 [PATCH] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-04 16:18 ` Ramsay Jones
2016-05-06 12:06 ` Johannes Schindelin
2016-05-04 19:06 ` Junio C Hamano
2016-05-06 15:19 ` Johannes Schindelin
2016-05-06 16:34 ` Junio C Hamano
2016-05-06 17:17 ` Junio C Hamano
2016-05-07 6:01 ` Johannes Schindelin
2016-05-07 6:44 ` Johannes Schindelin
2016-05-07 6:44 ` [PATCH v2 0/2] Support marking .git/ (or all files) as hidden on Windows Johannes Schindelin
2016-05-07 6:45 ` [PATCH v2 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-09 17:23 ` Junio C Hamano
2016-05-10 11:58 ` Johannes Schindelin
2016-05-10 17:19 ` Junio C Hamano [this message]
2016-05-11 8:40 ` Johannes Schindelin
2016-05-07 6:45 ` [PATCH v2 2/2] mingw: remove unnecessary definition Johannes Schindelin
2016-05-09 17:01 ` [PATCH v2 0/2] Support marking .git/ (or all files) as hidden on Windows Junio C Hamano
2016-05-10 8:41 ` Johannes Schindelin
2016-05-10 17:22 ` Junio C Hamano
2016-05-11 8:34 ` Johannes Schindelin
2016-05-10 11:59 ` [PATCH v3 " Johannes Schindelin
2016-05-10 11:59 ` [PATCH v3 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-10 11:59 ` [PATCH v3 2/2] mingw: remove unnecessary definition Johannes Schindelin
2016-05-11 8:40 ` [PATCH v4 0/2] Support marking .git/ (or all files) as hidden on Windows Johannes Schindelin
2016-05-11 8:43 ` Johannes Schindelin
2016-05-11 8:43 ` [PATCH v4 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-11 8:43 ` [PATCH v4 2/2] mingw: remove unnecessary definition Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqlh3hrfu3.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kusmabite@googlemail.com \
--cc=patthoyts@users.sourceforge.net \
--cc=ramsay@ramsayjones.plus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.