{"action":"created","issue":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/59","labels_url":"https://api.github.com/repos/dgutov/diff-hl/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/dgutov/diff-hl/issues/59/comments","events_url":"https://api.github.com/repos/dgutov/diff-hl/issues/59/events","html_url":"https://github.com/dgutov/diff-hl/issues/59","id":120985786,"number":59,"title":"diff-hl-update error on unsaved new file","user":{"login":"Wilfred","id":70800,"avatar_url":"https://avatars.githubusercontent.com/u/70800?v=3","gravatar_id":"","url":"https://api.github.com/users/Wilfred","html_url":"https://github.com/Wilfred","followers_url":"https://api.github.com/users/Wilfred/followers","following_url":"https://api.github.com/users/Wilfred/following{/other_user}","gists_url":"https://api.github.com/users/Wilfred/gists{/gist_id}","starred_url":"https://api.github.com/users/Wilfred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wilfred/subscriptions","organizations_url":"https://api.github.com/users/Wilfred/orgs","repos_url":"https://api.github.com/users/Wilfred/repos","events_url":"https://api.github.com/users/Wilfred/events{/privacy}","received_events_url":"https://api.github.com/users/Wilfred/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-08T11:12:11Z","updated_at":"2015-12-08T16:29:26Z","closed_at":null,"body":"When editing a file that isn't yet checked in, and has unsaved changes, I get the following error from diff-hl:\r\n\r\n```\r\nDebugger entered--Lisp error: (error \"Running git --no-pager cat-file blob 2c... ....FAILED (status 128)\")\r\n  signal(error (\"Running git --no-pager cat-file blob 2c... ....FAILED (status 128)\"))\r\n  error(\"Running %s...FAILED (%s)\" \"git --no-pager cat-file blob 2c... .\" \"status 128\")\r\n  vc-do-command(#<buffer  *temp file*> 0 \"git\" nil \"--no-pager\" \"cat-file\" \"blob\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa:a_new_file.py\")\r\n  apply(vc-do-command #<buffer  *temp file*> 0 \"git\" nil (\"--no-pager\" \"cat-file\" \"blob\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa:a_new_file.py\"))\r\n  vc-git-command(#<buffer  *temp file*> 0 nil \"cat-file\" \"blob\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa:a_new_file.py\")\r\n  vc-git-find-revision(\"/users/whughes/test_repo/a_new_file.py\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa\" #<buffer  *temp file*>)\r\n  apply(vc-git-find-revision (\"/users/whughes/test_repo/a_new_file.py\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa\" #<buffer  *temp file*>))\r\n  vc-call-backend(Git find-revision \"/users/whughes/test_repo/a_new_file.py\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa\" #<buffer  *temp file*>)\r\n  diff-hl-flydiff-create-revision(\"/users/whughes/test_repo/a_new_file.py\" \"2c0b6bc6cba388030b5135e2f58e214699fdb4fa\")\r\n  diff-hl-flydiff-buffer-with-head(\"/users/whughes/test_repo/a_new_file.py\" Git)\r\n  apply(diff-hl-flydiff-buffer-with-head (\"/users/whughes/test_repo/a_new_file.py\" Git))\r\n  diff-hl-changes-buffer(\"/users/whughes/test_repo/a_new_file.py\" Git)\r\n  diff-hl-changes()\r\n  #[0 \"byte-code-was-here\" [diff-hl-draw-borders diff-hl-changes 1 diff-hl-remove-overlays 3 signal wrong-number-of-arguments nil 0 diff-hl-add-highlighting empty single bottom top middle make-overlay (diff-hl-overlay-modified) overlay-put diff-hl t diff-hl-hunk modification-hooks insert-in-front-hooks insert-behind-hooks] 15 \"\\n\\n(fn)\"]()\r\n  diff-hl-flydiff/update(#[0 \"byte-code-was-here\" [diff-hl-draw-borders diff-hl-changes 1 diff-hl-remove-overlays 3 signal wrong-number-of-arguments nil 0 diff-hl-add-highlighting empty single bottom top middle make-overlay (diff-hl-overlay-modified) overlay-put diff-hl t diff-hl-hunk modification-hooks insert-in-front-hooks insert-behind-hooks] 15 \"\\n\\n(fn)\"] t)\r\n  apply(diff-hl-flydiff/update #[0 \"byte-code-was-here\" [diff-hl-draw-borders diff-hl-changes 1 diff-hl-remove-overlays 3 signal wrong-number-of-arguments nil 0 diff-hl-add-highlighting empty single bottom top middle make-overlay (diff-hl-overlay-modified) overlay-put diff-hl t diff-hl-hunk modification-hooks insert-in-front-hooks insert-behind-hooks] 15 \"\\n\\n(fn)\"] t)\r\n  diff-hl-update(t)\r\n  apply(diff-hl-update t)\r\n  byte-code(\"r\\301\b\\302H\b\\303H\\\"\\210)\\301\\207\" [timer apply 5 6] 4)\r\n  timer-event-handler([t 0 0 300000 t diff-hl-update (t) idle 0])\r\n```\r\n\r\nThe command it's trying to run is this:\r\n\r\n```\r\n$ git --no-pager cat-file blob 2c0b6bc6cba388030b5135e2f58e214699fdb4fa:a_new_file.py\r\nfatal: Not a valid object name 2c0b6bc6cba388030b5135e2f58e214699fdb4fa:a_new_file.py\r\n$ echo $?\r\n128\r\n```"},"comment":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/comments/162936419","html_url":"https://github.com/dgutov/diff-hl/issues/59#issuecomment-162936419","issue_url":"https://api.github.com/repos/dgutov/diff-hl/issues/59","id":162936419,"user":{"login":"dgutov","id":271877,"avatar_url":"https://avatars.githubusercontent.com/u/271877?v=3","gravatar_id":"","url":"https://api.github.com/users/dgutov","html_url":"https://github.com/dgutov","followers_url":"https://api.github.com/users/dgutov/followers","following_url":"https://api.github.com/users/dgutov/following{/other_user}","gists_url":"https://api.github.com/users/dgutov/gists{/gist_id}","starred_url":"https://api.github.com/users/dgutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgutov/subscriptions","organizations_url":"https://api.github.com/users/dgutov/orgs","repos_url":"https://api.github.com/users/dgutov/repos","events_url":"https://api.github.com/users/dgutov/events{/privacy}","received_events_url":"https://api.github.com/users/dgutov/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T16:29:25Z","updated_at":"2015-12-08T16:29:25Z","body":"@PythonNut Thanks. I think the patch should take only a few lines, but let me know if it turns out to be more complex."}}