5

I just upgraded to OSX Lion on my Mac and I aquired a strange problem with a git repo. I have my .vim files under version control with a number of plugins configured as git submodules. After upgrading, I ran a git status command into my .vim directory and got the following:

fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed
fatal: git status --porcelain failed

Does anyone know what my problem is? I searched the above error message on Google and SO, but I didn't find any answers. I've also noticed that git seems to be very slow now. Also, I have no other problems in other git repos (expect the slowness problem), which makes me think the problem is not related to Lion. Does anyone have any suggestions for how I can fix my .vim repo? Thanks in advance for the help.

Here is some of the trace output requested by drizzd:

setup: worktree: /Users/sbrown/.vim/bundle/supertab  
setup: cwd: /Users/sbrown/.vim/bundle/supertab  
setup: prefix: (null)  
trace: built-in: git 'status' '--porcelain'  
trace: run_command: 'status' '--porcelain'  
trace: exec: 'git' 'status' '--porcelain'  
setup: git_dir: .git  
setup: worktree: /Users/sbrown/.vim/bundle/surround  
setup: cwd: /Users/sbrown/.vim/bundle/surround  
setup: prefix: (null)  
trace: built-in: git 'status' '--porcelain'  
trace: run_command: 'status' '--porcelain'  
trace: exec: 'git' 'status' '--porcelain'  
setup: git_dir: .git  
setup: worktree: /Users/sbrown/.vim/bundle/tasklist  
setup: cwd: /Users/sbrown/.vim/bundle/tasklist  
setup: prefix: (null)  
trace: built-in: git 'status' '--porcelain'  
trace: run_command: 'status' '--porcelain'  
trace: exec: 'git' 'status' '--porcelain'  
setup: git_dir: .git  
setup: worktree: /Users/sbrown/.vim  
setup: cwd: /Users/sbrown/.vim  
setup: prefix: bundle/vim-colors-solarized/  
trace: built-in: git 'status' '--porcelain'  
trace: run_command: 'status' '--porcelain'  
trace: exec: 'git' 'status' '--porcelain'  
Mat
  • 202,337
  • 40
  • 393
  • 406
drbunsen
  • 10,139
  • 21
  • 66
  • 94
  • 3
    You mean http://stackoverflow.com/questions/5456683/why-do-i-get-fatal-git-status-porcelain-failed didn't help? – VonC Sep 04 '11 at 19:12
  • And the slowness might be explained by some git bash prompt configuration side-effet (http://superuser.com/questions/31744/how-to-get-git-completion-bash-to-work-on-mac-os-x) – VonC Sep 04 '11 at 19:16
  • Thanks for the help. I am still not entirely clear though. Are there aberrant .git files sprinkled though my submodules? I took a look and I didn't see any such files in two or three submodules. – drbunsen Sep 04 '11 at 19:48
  • sure, I was only referring to those questions to check if they could give you any lead. – VonC Sep 04 '11 at 19:54
  • Hmmm, all my submodules do have .git directories. Does git put .git directories in each submodule or is this my problem? – drbunsen Sep 04 '11 at 20:29
  • see http://stackoverflow.com/questions/1030169/git-easy-way-pull-latest-of-all-submodules. You can try with just one repo, to see if Git remains slow. – VonC Sep 04 '11 at 20:36
  • Which git version? Please retry with "GIT_TRACE=2 git status" and post the output. Thanks. – drizzd Sep 04 '11 at 21:39
  • thanks drizzd. i'm running git 1.7.4.4. do you want the whole trace output? its very long, i posted some of trace output above. – drbunsen Sep 04 '11 at 22:19

3 Answers3

3

For future reference, the only way I could correct the problem was to remove all submodules and then reinstall them.

drbunsen
  • 10,139
  • 21
  • 66
  • 94
  • Worked here. `rm` the submodule(s), and the run `git submodule init` and `git submodule update`. – rdougan Oct 07 '13 at 12:27
1

In case it helps anyone else, I just encountered the same issue and found that running git init in the project root fixed it.

Jordan Running
  • 102,619
  • 17
  • 182
  • 182
0

Your git-project (or at least one of your submodules, if you have some) became corrupted. This means that some of the files in your .git-folder(s) are corrupt or missing.

Fix git-repo

As Jordan mentioned: Go to your root and run git init. Then try git status again.

Fix submodules

If this doesn't work, navigate to your submodule-folder(s) and try git init again. Go back to root and run git status.

Why is it broken?

One answer could be, that there are problems with the access-permissions. Maybe you're working with several users on the working copy?

Another answer could be some kind of sync-software like OwnCloud, Dropbox, Google Drive or like in my case BitTorrent Sync. My working copies are located in the sync-folder, which is synced between my computer at work and at home. This causes some issues with permissions.

Hope it helps.

DerZyklop
  • 3,672
  • 2
  • 19
  • 27