From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Git Mailing List <git@vger.kernel.org>,
Dmitry Bykov <pvrt74@gmail.com>,
msysgit@googlegroups.com
Subject: Re: Probably a bug with "~" symbol in filenames on Windows 7 x64 in git 1.9.5
Date: Thu, 08 Jan 2015 11:08:47 -0800 [thread overview]
Message-ID: <xmqqegr5f5ts.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150108102815.GA4806@peff.net> (Jeff King's message of "Thu, 8 Jan 2015 05:28:16 -0500")
Jeff King <peff@peff.net> writes:
> On Thu, Jan 08, 2015 at 11:06:18AM +0100, Johannes Schindelin wrote:
>
>> ICON~714.PNG is a valid short name for a long name (such as
>> 'icon.background.png') because it fits the shortening scheme (8.3 format,
>> the base name ends in ~<n>). As this can clash with a validly shortened
>> long name, Git for Windows refuses to check out such paths by default.
>>
>> If you want the old -- unsafe -- behavior back, just set your
>> core.protectNTFS to false (this means that you agree that the incurred
>> problems are your own responsibility and cannot be blamed on anybody else
>> ;-))
>
> I wonder if it is worth having a "git-only" mode for core.protectNTFS.
> Turning it off entirely would make him susceptible to GIT~1 attacks.
Yes, I think having distinctions would make sense, but I am not sure
if "git-only" vs "every questionable included" should be the
classification.
To classify various funniness of paths by the extent of damage they
may cause for Windows:
- ".Git" and "GIT~1" would be the worst level;
- "CON.c" and the like would be the next bad level; and
- "ICON~714.PNG" would be in "to be avoided in an ideal world but
as long as the project is comfortable with having it in, Git is
in no position to complain" level.
that is just my knee-jerk reaction.
And if we were to go with just two level, I'd throw "CON.c" into the
same level as ".Git"; they both are to break the host that checks
out such paths. The former may break Git on the host, and the
latter may break something that is not Git on the host, but they are
not that different in that the end user on that host is harmed.
"8.3 ambiguity" does not directly harm individual hosts, but the
reason to flag is primarily because such a path may make the
project's contents unreliable (e.g. "icon1234234.png" may alias
"ICON~714.PNG" on somebody's machine, causing confusion). The same
reason should make us flag a tree object as suspect if it contains
two paths that are the same case-insensitively (e.g. a tree that
represents the "net/netfilter" part of the Linux kernel source would
be flagged because it contains both "xt_tcpmss.c" and "xt_TCPMSS.c").
Let's call the former Harmful and the latter Questionable. "CON.c"
is Harmful on Windows, while "net/netfilter" is Questionable on
Windows. Orthogonal to this, we earlier discussed what to do in
fsck and receive.fsckObjects. I think we want to be express
different shades of grays between the two extremes:
- A repository of a mono-culture project would want to flag
Harmfuls and Questionables that apply to the project's intended
platform as errors. By definition, a mono-culture project would
not care about paths that may only be Harmful on others'
platforms.
- A repository for a cross-platform project would want to flag
paths that may be Harmful or Questionable on some platform, and
does not care if these paths are Harmful or Questionable on the
platform that happens to host the repository. By definition, a
cross-platform project wants to make sure everybody involved will
not get hurt.
next prev parent reply other threads:[~2015-01-08 19:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 23:26 Probably a bug with "~" symbol in filenames on Windows 7 x64 in git 1.9.5 Dmitry Bykov
2015-01-07 23:35 ` Stefan Beller
2015-01-07 23:35 ` Junio C Hamano
2015-01-08 10:06 ` Johannes Schindelin
2015-01-08 10:28 ` Jeff King
2015-01-08 10:40 ` Johannes Schindelin
2015-01-08 12:59 ` Torsten Bögershausen
2015-01-08 15:58 ` [msysGit] " Johannes Schindelin
2015-01-08 16:37 ` Torsten Bögershausen
2015-01-08 19:08 ` Junio C Hamano [this message]
2015-01-08 19:42 ` Jeff King
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=xmqqegr5f5ts.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=msysgit@googlegroups.com \
--cc=peff@peff.net \
--cc=pvrt74@gmail.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.