{"action":"created","issue":{"url":"https://api.github.com/repos/chain/chain/issues/839","repository_url":"https://api.github.com/repos/chain/chain","labels_url":"https://api.github.com/repos/chain/chain/issues/839/labels{/name}","comments_url":"https://api.github.com/repos/chain/chain/issues/839/comments","events_url":"https://api.github.com/repos/chain/chain/issues/839/events","html_url":"https://github.com/chain/chain/pull/839","id":218341353,"number":839,"title":"cmd/slashland: fix logic to avoid empty commits","user":{"login":"kr","id":4178,"avatar_url":"https://avatars1.githubusercontent.com/u/4178?v=3","gravatar_id":"","url":"https://api.github.com/users/kr","html_url":"https://github.com/kr","followers_url":"https://api.github.com/users/kr/followers","following_url":"https://api.github.com/users/kr/following{/other_user}","gists_url":"https://api.github.com/users/kr/gists{/gist_id}","starred_url":"https://api.github.com/users/kr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kr/subscriptions","organizations_url":"https://api.github.com/users/kr/orgs","repos_url":"https://api.github.com/users/kr/repos","events_url":"https://api.github.com/users/kr/events{/privacy}","received_events_url":"https://api.github.com/users/kr/received_events","type":"User","site_admin":false},"labels":[{"id":467470339,"url":"https://api.github.com/repos/chain/chain/labels/PTAL","name":"PTAL","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-30T22:03:52Z","updated_at":"2017-04-03T18:02:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chain/chain/pulls/839","html_url":"https://github.com/chain/chain/pull/839","diff_url":"https://github.com/chain/chain/pull/839.diff","patch_url":"https://github.com/chain/chain/pull/839.patch"},"body":"Running 'git commit' (without --allow-empty) will fail\r\nwhen the file contents haven't changed, regardless of\r\nthe files' time stamps. We want to detect this situation\r\nahead of time and skip committing when the tree is\r\nclean.\r\n\r\nUnfortunately, diff-index, which is what we use to check\r\nfor a clean tree, *does* consider timestamps when\r\ncomputing the diff; fortunately, running 'git add' fixes\r\nthis and causes the behavior of diff-index to match what\r\ncommit looks for in its \"nothing to commit\" error\r\nmessage.\r\n\r\nSo now we explicitly add the files before checking to\r\nsee if the tree is clean.\r\n\r\nThis also gives us enough confidence to remove the\r\n--allow-empty check on commit. It would be preferable\r\nfor chainbot simply to fail, alerting us that there's a\r\nproblem, rather than producing an empty commit and\r\ncontinuing.\r\n\r\nFixes #830."},"comment":{"url":"https://api.github.com/repos/chain/chain/issues/comments/291223519","html_url":"https://github.com/chain/chain/pull/839#issuecomment-291223519","issue_url":"https://api.github.com/repos/chain/chain/issues/839","id":291223519,"user":{"login":"bobg","id":331061,"avatar_url":"https://avatars1.githubusercontent.com/u/331061?v=3","gravatar_id":"","url":"https://api.github.com/users/bobg","html_url":"https://github.com/bobg","followers_url":"https://api.github.com/users/bobg/followers","following_url":"https://api.github.com/users/bobg/following{/other_user}","gists_url":"https://api.github.com/users/bobg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobg/subscriptions","organizations_url":"https://api.github.com/users/bobg/orgs","repos_url":"https://api.github.com/users/bobg/repos","events_url":"https://api.github.com/users/bobg/events{/privacy}","received_events_url":"https://api.github.com/users/bobg/received_events","type":"User","site_admin":false},"created_at":"2017-04-03T18:02:14Z","updated_at":"2017-04-03T18:02:14Z","body":":eyes:"}}
{"actor":{"display_login":"bobg"}}