Question

When converting a JavaScript/Web project from Subversion to Git, I'm seeing a problem, even when I start over from scratch (the first Git repository is always bad).

The git svn clone works fine. From here on, pulling a bare repository looks good, but pulling a repository with working directory either from the original cloned repo or any subsequent bare repo gives the following error:

Cloning into 'R:\WebClone2'...
done.
fatal: unable to read tree f86e35f1f083aa394cd0c28871cb5433fe9751da
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

I don't see this exact combination of errors on SO. What I've done so far:

  • git fsck shows no problems, even with --full.
  • The Subversion project has empty folders. Could this be a problem? Adding .gitkeep to the empty folders in the cloned version does not repair downstream clones.
  • When I do a git status, it basically wants to delete every file and folder in the repo. If I commit, everything goes away.
  • If I instead do a git checkout, that repository becomes "good." Repos cloned from this good copy, though, show the same problem.

I'm lost. Thanks for your help.

Update: I put .gitkeep in the empty folders in Subversion, and reconverted with git svn clone - same problem.

Was it helpful?

Solution

I was never able to dig down to the exact problem, but I found a solution:

The origin repository is on a separate machine, accessible through a mapped drive on the Windows network. When I did the clone by navigating through Windows explorer, the clone failed with the error above. But when I used Remote Desktop or logged into the machine directly with my network user and password, the clone worked fine.

The only thing I can conclude is that it's a Windows/network login permissions issue. And some of the digging down into the repo errors hinted at this as well.

Hope this helps someone in the future!

Update: someone else in the office was having the same issue cloning a repository from the network drive to their own workstation. Testing showed that:

  • Everyone else was able to clone the repository to their own machines
  • She was not able to clone with her Windows login on someone else's machine
  • Others were able to clone onto her machine with their Windows logins

This seems to support the fact that there's some sort of Windows permissions issue, rather than a corrupt repository or other Git problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top