{"action":"created","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2454","labels_url":"https://api.github.com/repos/magit/magit/issues/2454/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2454/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2454/events","html_url":"https://github.com/magit/magit/issues/2454","id":123901120,"number":2454,"title":"Staging with global-auto-revert-mode makes Emacs hang in Windows","user":{"login":"joonro","id":1063143,"avatar_url":"https://avatars.githubusercontent.com/u/1063143?v=3","gravatar_id":"","url":"https://api.github.com/users/joonro","html_url":"https://github.com/joonro","followers_url":"https://api.github.com/users/joonro/followers","following_url":"https://api.github.com/users/joonro/following{/other_user}","gists_url":"https://api.github.com/users/joonro/gists{/gist_id}","starred_url":"https://api.github.com/users/joonro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joonro/subscriptions","organizations_url":"https://api.github.com/users/joonro/orgs","repos_url":"https://api.github.com/users/joonro/repos","events_url":"https://api.github.com/users/joonro/events{/privacy}","received_events_url":"https://api.github.com/users/joonro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magit/magit/labels/bug%20windows","name":"bug windows","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-12-25T23:50:11Z","updated_at":"2016-01-01T18:07:08Z","closed_at":"2016-01-01T14:13:57Z","body":"Hi,\r\n\r\nStaging makes Emacs hangs - happens very frequently with line staging, but it occurs with hunk staging as well if I try it multiple times. The status line shows `Magit C:\\Program Files\\Git\\cmd\\git.exe apply.`\r\n\r\nI'm using Git for Windows `2.6.4`, GNU Emacs `25.0.50.1 (x86_64-w64-mingw32)`, magit `20151223.1425` (from melpa) in Windows 10.\r\n\r\nEdited: I found the culprit. The problem was `(global-auto-revert-mode t)` in my init file. With this, 2-3 tries of staging lines make Emacs hang.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magit/magit/issues/comments/168323738","html_url":"https://github.com/magit/magit/issues/2454#issuecomment-168323738","issue_url":"https://api.github.com/repos/magit/magit/issues/2454","id":168323738,"user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T18:07:08Z","updated_at":"2016-01-01T18:07:08Z","body":"> On Linux I don't see this problem, so I would guess it is a bug in Windows specific code in Emacs.\r\n\r\nYeah, I'll open an Emacs bug when the debbugs server gets back on line. I suspect it might be an inherent limitation in the Windows notification API though.\r\n\r\n> But we use this for commands which should be synchronous, so we block. In this case for example, the user cannot really go on staging the next hunk if git isn't done yet staging the previous hook.\r\n\r\nI was going to suggest that not blocking the whole Emacs might *feel* \"faster\" to the user, but I tried a quick hack using `recursive-edit`, and Emacs still gets blocked by the subsequent refresh anyway, so there really isn't any point in removing the wait.\r\n\r\nI wonder if it would be better to write the input to a temp file so we can use `call-process` though.\r\n\r\n\r\n"}}