Subject: Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |

From: Zenobiusz Kunegunda <[email-masked]>
Date: Tue, 14 Mar 2017 16:25:50 +0100

Output of 

truss git status 2>&1 >/dev/null |grep chdir

is empty when git status fails.

Also git status succeeded when run as root.Od: "René Scharfe" &lt;[email-masked]>
Do: "Zenobiusz Kunegunda" &lt;[email-masked]>; 
Wysłane: 18:32 Poniedziałek 2017-03-13
Temat: Re: fatal: Could not get current working directory: Permission denied | affected 2.10,2.11,2.12, but not 1.9.5 |

> 
>> Am 13.03.2017 um 13:23 schrieb Zenobiusz Kunegunda:
>> Tested on ZFS filesystem
>> 
>> 
>> 
>>     [test0@s0]:&lt;~>$ mkdir '232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222'
>>     [test0@s0]:&lt;~>$ cd 232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222/
>>     [test0@s0]:&lt;~/232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222>$ git status
>>     fatal: Unable to read current working directory: Permission denied
>> 
>>     [test0@s0]:&lt;~/232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222>$ git blahblahblah
>>     fatal: Unable to read current working directory: Permission denied
>> 
>> 
>> But when I create directory with same name (232...) as it's subdirectory everything works as expected inside that subdirectory.
> 
> Earlier I checked on UFS.  Now I tried the above commands on ZFS,
> but they work as expected:
> 
>   $ git status
>   fatal: Not a git repository (or any parent up to mount point /src)
>   Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> 
> Git checks out if it's in a git repository and if the current
> working directory isn't one then it goes to the parent directories
> recursively until it finds the root of a repo or a file system
> boundary or / (root).
> 
> You can see where your invocation goes to with:
> 
> 	$ strace git status 2>&amp;1 >/dev/null | grep chdir
> 
> René
> 
>