{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/9257","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/9257/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/9257/comments","events_url":"https://api.github.com/repos/atom/atom/issues/9257/events","html_url":"https://github.com/atom/atom/issues/9257","id":112890145,"number":9257,"title":"File auto reloading with untracked git files during branch change","user":{"login":"acb","id":4690898,"avatar_url":"https://avatars3.githubusercontent.com/u/4690898?v=4","gravatar_id":"","url":"https://api.github.com/users/acb","html_url":"https://github.com/acb","followers_url":"https://api.github.com/users/acb/followers","following_url":"https://api.github.com/users/acb/following{/other_user}","gists_url":"https://api.github.com/users/acb/gists{/gist_id}","starred_url":"https://api.github.com/users/acb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acb/subscriptions","organizations_url":"https://api.github.com/users/acb/orgs","repos_url":"https://api.github.com/users/acb/repos","events_url":"https://api.github.com/users/acb/events{/privacy}","received_events_url":"https://api.github.com/users/acb/received_events","type":"User","site_admin":false},"labels":[{"id":163641905,"url":"https://api.github.com/repos/atom/atom/labels/atom","name":"atom","color":"f7c6c7","default":false},{"id":33602150,"url":"https://api.github.com/repos/atom/atom/labels/bug","name":"bug","color":"f7c6c7","default":true},{"id":372218233,"url":"https://api.github.com/repos/atom/atom/labels/data-loss","name":"data-loss","color":"e11d21","default":false},{"id":247105569,"url":"https://api.github.com/repos/atom/atom/labels/git","name":"git","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2015-10-22T20:57:42Z","updated_at":"2017-09-15T11:11:29Z","closed_at":null,"author_association":"NONE","body":"Firstly:\nAtom 1.0.19\nUbuntu 14.04.2 LTS\n\nThe file buffer autoloading fails to load changes from `git stash pop`s on files that didn't exist in the previous branch you were on.  That's kind of a confusing sentence so I'll elaborate.  In this repo https://github.com/acb/Atom-Test there is a branch `master` with the file `master.txt` in it.  There is also a branch `dev` that has a file `dev.txt` in it that does not exist in `master`.\n\nNow perform the following steps (leaving `dev.txt` open in Atom the entire time):\n1. `git checkout dev`\n2. Alter `dev.txt` in some way\n3. `git stash` -- changes in `dev.txt` are stashed and the buffer in Atom changes appropriately\n4. `git checkout master`\n5. `git checkout dev`\n6. `git stash pop` -- changes in `dev.txt` are `pop`ped to disk, but the buffer in Atom **does not** update\n\nNo errors are shown in the console.\n\nIf this goes undected by the user they could accidentally save `dev.txt` and blow away their stashed changes without any warning.  The solution as of now is to close the file (and DON'T SAVE CHANGES when prompted) and reopen.  In Sublime Text in this situation you get a prompt stating that the file changed on disk and asking you if you would like to reload.\n\nAttached is a gif of the behavior.  Please let me know if I can provide any more information, and feel free to use the repo linked above for any testing you may need.\n\n![atom-bug](https://cloud.githubusercontent.com/assets/4690898/10678022/bcda2682-78dd-11e5-830e-c29b223c1763.gif)\n"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/329752854","html_url":"https://github.com/atom/atom/issues/9257#issuecomment-329752854","issue_url":"https://api.github.com/repos/atom/atom/issues/9257","id":329752854,"user":{"login":"binaryfunt","id":14579418,"avatar_url":"https://avatars0.githubusercontent.com/u/14579418?v=4","gravatar_id":"","url":"https://api.github.com/users/binaryfunt","html_url":"https://github.com/binaryfunt","followers_url":"https://api.github.com/users/binaryfunt/followers","following_url":"https://api.github.com/users/binaryfunt/following{/other_user}","gists_url":"https://api.github.com/users/binaryfunt/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryfunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryfunt/subscriptions","organizations_url":"https://api.github.com/users/binaryfunt/orgs","repos_url":"https://api.github.com/users/binaryfunt/repos","events_url":"https://api.github.com/users/binaryfunt/events{/privacy}","received_events_url":"https://api.github.com/users/binaryfunt/received_events","type":"User","site_admin":false},"created_at":"2017-09-15T11:11:29Z","updated_at":"2017-09-15T11:11:29Z","author_association":"NONE","body":"I tried using the [file-watcher package](https://atom.io/packages/file-watcher) with \"Prompt on change\" ticked, but it didn't do anything at all when I edited a file, stashed, checked out another branch, checked out back again, popped the stash and started editing the non-updated file on buffer"}}
{"actor":{"display_login":"binaryfunt"}}