{"action":"created","issue":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/50","labels_url":"https://api.github.com/repos/dgutov/diff-hl/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/dgutov/diff-hl/issues/50/comments","events_url":"https://api.github.com/repos/dgutov/diff-hl/issues/50/events","html_url":"https://github.com/dgutov/diff-hl/pull/50","id":100869861,"number":50,"title":"[WIP] Allow diffing on-the-fly","user":{"login":"PythonNut","id":5009546,"avatar_url":"https://avatars.githubusercontent.com/u/5009546?v=3","gravatar_id":"","url":"https://api.github.com/users/PythonNut","html_url":"https://github.com/PythonNut","followers_url":"https://api.github.com/users/PythonNut/followers","following_url":"https://api.github.com/users/PythonNut/following{/other_user}","gists_url":"https://api.github.com/users/PythonNut/gists{/gist_id}","starred_url":"https://api.github.com/users/PythonNut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PythonNut/subscriptions","organizations_url":"https://api.github.com/users/PythonNut/orgs","repos_url":"https://api.github.com/users/PythonNut/repos","events_url":"https://api.github.com/users/PythonNut/events{/privacy}","received_events_url":"https://api.github.com/users/PythonNut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-13T21:08:18Z","updated_at":"2015-08-14T01:56:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dgutov/diff-hl/pulls/50","html_url":"https://github.com/dgutov/diff-hl/pull/50","diff_url":"https://github.com/dgutov/diff-hl/pull/50.diff","patch_url":"https://github.com/dgutov/diff-hl/pull/50.patch"},"body":"See #33 \r\n\r\nThis isn't quite ready. It doesn't have the following advice for the two `vc` functions.\r\n```emacs\r\n(with-eval-after-load 'vc\r\n  (defun nadvice/vc-working-revision (file &optional backend concrete)\r\n    (if concrete\r\n      (vc-call-backend backend 'working-revision file t)\r\n      (or (vc-file-getprop file 'vc-working-revision)\r\n        (progn\r\n          (setq backend (or backend (vc-responsible-backend file)))\r\n          (when backend\r\n            (vc-file-setprop file 'vc-working-revision\r\n              (vc-call-backend backend 'working-revision file)))))))\r\n  (advice-add #'vc-working-revision :override #'nadvice/vc-working-revision))\r\n\r\n(with-eval-after-load 'vc-git\r\n  (defun nadvice/vc-git-working-revision (old-fun file &optional concrete)\r\n    \"Git-specific version of `vc-working-revision'.\"\r\n    (if concrete\r\n      (vc-git--rev-parse (funcall old-fun file))\r\n      (funcall old-fun file)))\r\n\r\n  (advice-add #'vc-git-working-revision :around\r\n    #'nadvice/vc-git-working-revision))\r\n```\r\n\r\nWill I\r\n\r\n1. Commit some variant of these to the Emacs codebase and disallow `diff-hl-flydiff-mode` on all versions up to but not including the patched one?\r\n2. Commit the code to Emacs, and keep some advice in `diff-hl` that:\r\n  1. Switches on the Emacs version?\r\n  2. Switches on some sort of feature detection?\r\n\r\nThis has passed my initial testing with the above advice, so things seem to be going well."},"comment":{"url":"https://api.github.com/repos/dgutov/diff-hl/issues/comments/130918386","html_url":"https://github.com/dgutov/diff-hl/pull/50#issuecomment-130918386","issue_url":"https://api.github.com/repos/dgutov/diff-hl/issues/50","id":130918386,"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-08-14T01:56:27Z","updated_at":"2015-08-14T01:56:27Z","body":"Although using `nadvice` might not be too bad either. It has \"local\" advices for purposes such as this."}}