{"action":"created","issue":{"url":"https://api.github.com/repos/git-for-windows/git/issues/1110","repository_url":"https://api.github.com/repos/git-for-windows/git","labels_url":"https://api.github.com/repos/git-for-windows/git/issues/1110/labels{/name}","comments_url":"https://api.github.com/repos/git-for-windows/git/issues/1110/comments","events_url":"https://api.github.com/repos/git-for-windows/git/issues/1110/events","html_url":"https://github.com/git-for-windows/git/issues/1110","id":217369488,"number":1110,"title":"Git status fails with submodules","user":{"login":"rcdailey","id":1768054,"avatar_url":"https://avatars1.githubusercontent.com/u/1768054?v=3","gravatar_id":"","url":"https://api.github.com/users/rcdailey","html_url":"https://github.com/rcdailey","followers_url":"https://api.github.com/users/rcdailey/followers","following_url":"https://api.github.com/users/rcdailey/following{/other_user}","gists_url":"https://api.github.com/users/rcdailey/gists{/gist_id}","starred_url":"https://api.github.com/users/rcdailey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcdailey/subscriptions","organizations_url":"https://api.github.com/users/rcdailey/orgs","repos_url":"https://api.github.com/users/rcdailey/repos","events_url":"https://api.github.com/users/rcdailey/events{/privacy}","received_events_url":"https://api.github.com/users/rcdailey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-27T20:44:01Z","updated_at":"2017-03-28T18:20:45Z","closed_at":null,"body":" - [x] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing\r\n\r\n### Setup\r\n\r\n - Which version of Git for Windows are you using? Is it 32-bit or 64-bit?\r\n\r\n```\r\n$ git --version --build-options\r\ngit version 2.12.2.windows.1\r\nbuilt from commit: 212247dd6345c820deeae61fcdf2f10cea10525a\r\nsizeof-long: 4\r\nmachine: x86_64\r\n```\r\n\r\n - Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?\r\n\r\n```\r\n$ cmd.exe /c ver\r\n\r\nMicrosoft Windows [Version 10.0.14393]\r\n```\r\n\r\n - What options did you set as part of the installation? Or did you choose the\r\n   defaults?\r\n\r\n```\r\n# One of the following:\r\n> type \"C:\\Program Files\\Git\\etc\\install-options.txt\"\r\n> type \"C:\\Program Files (x86)\\Git\\etc\\install-options.txt\"\r\n> type \"%USERPROFILE%\\AppData\\Local\\Programs\\Git\\etc\\install-options.txt\"\r\n$ cat /etc/install-options.txt\r\nPath Option: Cmd\r\nSSH Option: OpenSSH\r\nCURL Option: OpenSSL\r\nCRLF Option: CRLFAlways\r\nBash Terminal Option: MinTTY\r\nPerformance Tweaks FSCache: Enabled\r\nUse Credential Manager: Enabled\r\nEnable Symlinks: Disabled\r\n```\r\n\r\n - Any other interesting things about your environment that might be related\r\n   to the issue you're seeing?\r\n\r\nN/A\r\n\r\n### Details\r\n\r\n - Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other\r\n\r\nBash\r\n\r\n - What commands did you run to trigger this issue? If you can provide a\r\n   [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)\r\n   this will help us understand the issue.\r\n\r\n```\r\n$ git status\r\n```\r\n - What did you expect to occur after running these commands?\r\n\r\nStatus of working directory\r\n\r\n - What actually happened instead?\r\n\r\nGot the following error:\r\n\r\n```\r\n$ GIT_TRACE=1 git st\r\n15:38:09.053060 git.c:596               trace: exec: 'git-st'\r\n15:38:09.053575 run-command.c:369       trace: run_command: 'git-st'\r\n15:38:09.056061 git.c:299               trace: alias expansion: st => 'status' '-sb'\r\n15:38:09.057061 git.c:642               trace: exec: 'git' 'status' '-sb'\r\n15:38:09.057061 run-command.c:369       trace: run_command: 'git' 'status' '-sb'\r\n15:38:09.064564 git.c:371               trace: built-in: git 'status' '-sb'\r\n15:38:09.072061 run-command.c:369       trace: run_command: 'status' '--porcelain'\r\n15:38:09.079736 git.c:371               trace: built-in: git 'status' '--porcelain'\r\nfatal: 'git status --porcelain' failed in submodule ThirdParty\r\n```\r\n\r\n - If the problem was occurring with a specific repository, can you provide the\r\n   URL to that repository to help us with testing?\r\n\r\nUnfortunately I tried reproducing a MCVE locally with simple repositories with nested submodules, but I could not replicate the behavior. I also tried a public repo with submodules (hunter on Github) and was not able to repro there either. Must be something specific to the repository I'm working on at `$DAYJOB`.\r\n\r\n\r\nMy top-most repository has nested submodules:\r\n\r\n`<root repo>` -> `Core` -> `ThirdParty`\r\n\r\nWhen I run `git status` from the root repo, I get:\r\n\r\n```\r\n$ git status\r\nfatal: 'git status --porcelain' failed in submodule ThirdParty\r\nfatal: 'git status --porcelain' failed in submodule Core\r\n```\r\n\r\nAnd just from `Core` I get:\r\n\r\n```\r\n$ git status\r\nfatal: 'git status --porcelain' failed in submodule ThirdParty\r\n```\r\n\r\nWhen I `cd` into `ThirdParty` and attempt a `git checkout`, I get this:\r\n\r\n```\r\n$ git checkout master\r\nfatal: Unable to create 'E:/code/frontend2/source/.git/modules/Core/modules/ThirdParty/index.lock': File exists.\r\n\r\nAnother git process seems to be running in this repository, e.g.\r\nan editor opened by 'git commit'. Please make sure all processes\r\nare terminated then try again. If it still fails, a git process\r\nmay have crashed in this repository earlier:\r\nremove the file manually to continue.\r\n```\r\n\r\nI remove the `index.lock` file and try the checkout again, it works. In fact, any number of checkouts will work until I go back up to the submodule above, run the `git status` again, then return back down to `ThirdParty` and I get the lock issue again. So the status command is causing weird lock issues in submodules it seems.\r\n\r\nI also am monitoring child processes of `bash.exe` and the `git.exe` and `sh.exe` processes spawn and go away with each command (although the hierarchy of processes themselves is quite deep when they execute, not sure if that's abnormal). So there's no rogue commands that persist to keep the lock file there from what I can tell.\r\n\r\nSorry I don't have more information than this. Let me know if there's anything else I can provide to help."},"comment":{"url":"https://api.github.com/repos/git-for-windows/git/issues/comments/289859565","html_url":"https://github.com/git-for-windows/git/issues/1110#issuecomment-289859565","issue_url":"https://api.github.com/repos/git-for-windows/git/issues/1110","id":289859565,"user":{"login":"bturner","id":121199,"avatar_url":"https://avatars3.githubusercontent.com/u/121199?v=3","gravatar_id":"","url":"https://api.github.com/users/bturner","html_url":"https://github.com/bturner","followers_url":"https://api.github.com/users/bturner/followers","following_url":"https://api.github.com/users/bturner/following{/other_user}","gists_url":"https://api.github.com/users/bturner/gists{/gist_id}","starred_url":"https://api.github.com/users/bturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturner/subscriptions","organizations_url":"https://api.github.com/users/bturner/orgs","repos_url":"https://api.github.com/users/bturner/repos","events_url":"https://api.github.com/users/bturner/events{/privacy}","received_events_url":"https://api.github.com/users/bturner/received_events","type":"User","site_admin":false},"created_at":"2017-03-28T18:20:45Z","updated_at":"2017-03-28T18:20:45Z","body":"@rcdailey So if I understand you right, your `git status` issue with submodules only affects 2.12.2? 2.12.1 doesn't have any issues for you?\r\n\r\nNote that the path _to_ the repository is only part of the story. The length of paths _within_ the repository appears to be more relevant. Does your repository happen to contain deep paths?"}}
{"actor":{"display_login":"bturner"}}