Re: [msysGit] Re: Probably a bug with ~ symbol in filenames on Windows 7 x64 in git 1.9.5

2015-01-08 Thread Torsten Bögershausen

On 01/08/2015 11:28 AM, Jeff King wrote:

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.

-Peff


There is something more then just the tilde protection going on, it seems:


torstenbogershausen@TORBOGWM ~/projects/test_tilde (master)
$  ~/projects/git/msysgit/git ls-files
ICON~714.PNG

torstenbogershausen@TORBOGWM ~/projects/test_tilde (master)
$  ~/projects/git/msysgit/git status
On branch master
nothing to commit, working directory clean

torstenbogershausen@TORBOGWM ~/projects/test_tilde (master)
$  ~/projects/git/tb/git status
On branch master
nothing to commit, working directory clean

torstenbogershausen@TORBOGWM ~/projects/test_tilde (master)
$  ~/projects/git/msysgit/git --version
git version 1.9.2.msysgit.0.2273.gc47d6ec

torstenbogershausen@TORBOGWM ~/projects/test_tilde (master)
$  ~/projects/git/tb/git --version
git version 2.2.1.268.g1e6f5b2

Neither latest msygit nor latest git.git reports a problem with a single 
file

within a short path.
It may be, that the '~' is not accepted in a long path or there are 
problems

when a directory is filled with many files, but that is speculation.

Dimitry,
is there a way to make the problem reproducible for other people ?
Either a public demo-repo, or a step-by-step receipe  ?

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [msysGit] Re: Probably a bug with ~ symbol in filenames on Windows 7 x64 in git 1.9.5

2015-01-08 Thread Torsten Bögershausen
On 01/08/2015 04:58 PM, Johannes Schindelin wrote:
 Hi Torsten,
 
 On Thu, 8 Jan 2015, Torsten Bögershausen wrote:
 
 There is something more then just the tilde protection going on, [...]
 
 Indeed. What is going on is that you build Git yourself, from git.git,
 while Dmitry obviously used Git for Windows -- which carries a couple of
 patches on top of upstream git.git.
 
 In this particular case, the tilde protection was introduced in
 https://github.com/msysgit/git/commit/2e2a2d12.
 
 Ciao,
 Johannes
 
My bad, I was building the msysgit master branch, which didn't have the 
2e2a2d12.

However, I am wondering if 2e2a2d12 is really needed that much ?
In the same spirit that we do not prevent the checkout of FILE when file is 
present,
why do we prevent people from using ~ in file names ?
When a file is visible under different file names, I assume that the user 
chooses only
one representation to run git add on.
But that is another discussion.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [msysGit] Re: Probably a bug with ~ symbol in filenames on Windows 7 x64 in git 1.9.5

2015-01-08 Thread Johannes Schindelin
Hi Torsten,

On Thu, 8 Jan 2015, Torsten Bögershausen wrote:

 There is something more then just the tilde protection going on, [...]

Indeed. What is going on is that you build Git yourself, from git.git,
while Dmitry obviously used Git for Windows -- which carries a couple of
patches on top of upstream git.git.

In this particular case, the tilde protection was introduced in
https://github.com/msysgit/git/commit/2e2a2d12.

Ciao,
Johannes