-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
‘fatal: Unable to read current directory: No error’ for every local Git repository I have #473
Comments
Could you try a Git repo that doesn't have spaces in the path? |
@rexcfnghk I will need substantially more information than that, and preferably a Minimal, Complete & Verifiable Example. Please study https://github.com/git-for-windows/git/wiki/Issue-reporting-guidelines and then provide the missing information. |
I am using the following environment:
When I try to
The other example is shown above when running When I try cloning into another directory without spaces in the file path, it clones successfully:
|
Sorry it seems that I accidentally created the symlink |
Hmpf. That is really too scarce information, causing quite a bit of lost time on my end. This is what I tried:
This worked. Then I tried the same with a junction point: So I guess that we will really not be able to fix this issue, unless you, @rexcfnghk, put in a little bit of an effort to come up with a Minimal, Complete & Verifiable Example. |
I've the exact same problem and the only way I figured it out to get it to work is to give a cd to a repo with the full documents path (C:\Users\username\Documents\Gitrepo). In fact now if I start a new powershell session and I go to the document folder without padding him the full path (just cd documents) it doesn't work! UPDATE: |
@giacomocerquone I get the distinct impression that there is a ton of really vital information that has been left out. You report that you have the exact same problem, but fail to mention which version and particular settings you use. Then PowerShell is mentioned briefly. How did you set Git up to be used from PowerShell? And then there is talk about a symlink in an update of the comment? Seriously, it is a bit much to ask me to cobble back together a clear picture from these scattered bits and pieces. Please do not make my life so hard. You can do better than that. |
Hi @dscho, I thought some of you would have opened the other issue, when I ask for help I'm always very specific. As I said:
|
This is a precise report: I downloaded Git for Windows 2.6.3 (64-bit), installed it with the "Windows default terminal" option, then I cloned a repository into my home directory and XYZ happened (I expected ABC instead). If I clone the same repository into With such a precise report, I would have a chance to reproduce your issue. |
I don't know if you're doing just an example or you really didn't understand what I said. Anyway this seems hilarious to me, you're again seeking clarification from me but everything has been already written (just in an inconvenient order). I downloaded Github Desktop and installed it (it's an exe file) 8 months ago and for 4 months I always used the GUI version (never touched powershell or git directly). So 4 months ago I started using git from powershell (without installing anything) I just did what's written in this guide (basically it links posh-git used by Github Desktop that was already installed to the PATH environment variable editing the powershell profile). I have always had my repos inside this folder: C:\Users\username\Documenti\Github\ ("Documenti" is the italian version of "Documents"... just to be precise). When everything was workingUntil a few days ago I've always worked with git giving this commands (and never a problem):
After windows 10 and github desktop update this doesn't workBut since I installed both the new Windows 10 major update and the new Github Desktop version this is what happened:
After windows 10 and github desktop update this works (note the "documents" is that that make it works):
These are the actual version of the software in questionGit
Github Desktop
Windows
ConclusionYou said you're "getting the distinct impression..." and you were right, it's just an impression, we already said everything we could. I think that everyone here, included me, doesn't know which way to turn. Man I hope it is enough now, if it isn't I don't know what else I can tell you. |
@giacomocerquone you do realize that
|
dahlbyk linked the issue I opened on posh-git here and so here we are and anyway doesn't matter that this is git for Windows because:
I don't want to be testy, but you're asking questions that more and more people already answered, but if you felt offended, I ask you sorry. |
Incidentally, for those who run into this problem in the future, the cause of the problem on my end was an intermediate folder permissions issue. For example, if the path is |
@happycollision thank you for reporting this, and congratulations for the successful investigation! |
/var/www/html/ERP$ git branch why this problem occuring |
@awatasoftsys as you can see from the error message, this is a different problem than the one described in this ticket. In any case, it would make a lot of sense to try to come up with an MCVE and then to open a separate ticket. |
…bug with deep sparse-checkout paths We got multiple similar reports of failures with the sparse index (git-for-windows#473 as an issue, and another regarding `git checkout` via email). Both were hitting a similar set of paths, which was a hint. The reason we didn't hit this before is because it requires the following: 1. The sparse-checkout definition needs to have recursive inclusion of deep folders (depth 3 or more). 2. _Adjacent_ to those deep folders, we need a deep sparse directory entry that receives changes. 3. In this particular repo, deep directories are only added to the sparse-checkout in rare occasions and those adjacent folders are rarely updated. They happened to update this week and hit our sparse index dogfooders in surprising ways. The first commit adds a test that fails without the fix. It requires modifying our test data to make adjacent, deep sparse directory entries possible. It's a rather simple test after we have that data change. The second commit includes the actual fix. It's really just an error of not understanding the difference between the `name` and `traverse_path` members of the `struct traverse_info` structure. `name` only stores a single tree entry while `traverse_path` actually includes the full name from root. The method we are editing also has an additional `struct name_entry` that fills in the tree entry on top of the `traverse_path`, which explains how this worked to depth two, but not depth three. Resolves git-for-windows#473 See also gitgitgadget#1092
…bug with deep sparse-checkout paths We got multiple similar reports of failures with the sparse index (git-for-windows#473 as an issue, and another regarding `git checkout` via email). Both were hitting a similar set of paths, which was a hint. The reason we didn't hit this before is because it requires the following: 1. The sparse-checkout definition needs to have recursive inclusion of deep folders (depth 3 or more). 2. _Adjacent_ to those deep folders, we need a deep sparse directory entry that receives changes. 3. In this particular repo, deep directories are only added to the sparse-checkout in rare occasions and those adjacent folders are rarely updated. They happened to update this week and hit our sparse index dogfooders in surprising ways. The first commit adds a test that fails without the fix. It requires modifying our test data to make adjacent, deep sparse directory entries possible. It's a rather simple test after we have that data change. The second commit includes the actual fix. It's really just an error of not understanding the difference between the `name` and `traverse_path` members of the `struct traverse_info` structure. `name` only stores a single tree entry while `traverse_path` actually includes the full name from root. The method we are editing also has an additional `struct name_entry` that fills in the tree entry on top of the `traverse_path`, which explains how this worked to depth two, but not depth three. Resolves git-for-windows#473 See also gitgitgadget#1092
Background
I currently have two git programs installed on my computer:
I use Git Bash most of the time and I use GitHub Desktop when I need a bigger picture of my repository.
Issue
The problem is I can no longer run any Git commands on Git Bash. This happens when I try to run
git status
:The strange thing is it works perfectly fine in the Git shell that comes with GitHub desktop (which I believe is PowerShell based):
The text was updated successfully, but these errors were encountered: