{"action":"closed","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2212","repository_url":"https://api.github.com/repos/magit/magit","labels_url":"https://api.github.com/repos/magit/magit/issues/2212/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2212/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2212/events","html_url":"https://github.com/magit/magit/issues/2212","id":103495697,"number":2212,"title":".git/index.lock is unexpectedly held by some process of unknown origin","user":{"login":"bgamari","id":1010174,"avatar_url":"https://avatars.githubusercontent.com/u/1010174?v=3","gravatar_id":"","url":"https://api.github.com/users/bgamari","html_url":"https://github.com/bgamari","followers_url":"https://api.github.com/users/bgamari/followers","following_url":"https://api.github.com/users/bgamari/following{/other_user}","gists_url":"https://api.github.com/users/bgamari/gists{/gist_id}","starred_url":"https://api.github.com/users/bgamari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgamari/subscriptions","organizations_url":"https://api.github.com/users/bgamari/orgs","repos_url":"https://api.github.com/users/bgamari/repos","events_url":"https://api.github.com/users/bgamari/events{/privacy}","received_events_url":"https://api.github.com/users/bgamari/received_events","type":"User","site_admin":false},"labels":[{"id":94493,"url":"https://api.github.com/repos/magit/magit/labels/bug%20emacs","name":"bug emacs","color":"f7c6c7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/magit/magit/milestones/19","html_url":"https://github.com/magit/magit/milestone/19","labels_url":"https://api.github.com/repos/magit/magit/milestones/19/labels","id":1203589,"number":19,"title":"2.3.0","description":"See the roadmap (https://github.com/magit/magit/issues/2180).","creator":{"login":"tarsius","id":25046,"avatar_url":"https://avatars.githubusercontent.com/u/25046?v=3","gravatar_id":"","url":"https://api.github.com/users/tarsius","html_url":"https://github.com/tarsius","followers_url":"https://api.github.com/users/tarsius/followers","following_url":"https://api.github.com/users/tarsius/following{/other_user}","gists_url":"https://api.github.com/users/tarsius/gists{/gist_id}","starred_url":"https://api.github.com/users/tarsius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarsius/subscriptions","organizations_url":"https://api.github.com/users/tarsius/orgs","repos_url":"https://api.github.com/users/tarsius/repos","events_url":"https://api.github.com/users/tarsius/events{/privacy}","received_events_url":"https://api.github.com/users/tarsius/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":154,"state":"closed","created_at":"2015-07-11T22:11:39Z","updated_at":"2016-12-10T17:09:31Z","due_on":"2015-10-27T23:00:00Z","closed_at":"2015-11-09T13:49:17Z"},"comments":11,"created_at":"2015-08-27T12:18:14Z","updated_at":"2016-12-10T17:09:31Z","closed_at":"2016-12-10T17:09:31Z","body":"`git` commands such as `rebase` and `amend` run outside of magit tend to fail `emacs` has a file open in the same repository. The following error is produced,\n\n```\ngit cherry-pick 1779ba85bea9db64257bb80e25fb6998bcc758e4\nfatal: Unable to create '/opt/exp/ghc/ghc-landing/.git/index.lock': File exists.\n\nIf no other git process is currently running, this probably means a\ngit process crashed in this repository earlier. Make sure no other git\nprocess is running and remove the file manually to continue.\n```\n\nYet looking in `.git` after the failure shows no such file. I believe that emacs is refreshing the file when it sees a change, which then causes magit to poke at the git repo, taking the lockfile and triggering the failure. The fact that  it is much harder to reproduce the issue when the `git` process in question is run in `strace` tends to support this hypothesis.\n\nIdeally magit would have a hold-off time between seeing a change and refreshing its status to make it more likely that the repo is idle before poking at it.\n"}}
{"actor":{"display_login":"tarsius"}}